!lymvtcwDJ7ZA9Npq:lix.systems

Lix Development

396 Members
(Technical) development of Lix, the package manager, a Nix implementation. Please be mindful of ongoing technical conversations in this channel.134 Servers

Load older messages


SenderMessageTime
14 Oct 2025
@k900:0upti.meK900Or generated drvs16:19:21
@raitobezarius:matrix.orgraitobezarius From what I see, it's doubly problematic that people have already started doing builtins.convertHash instead of lib.convertHash 16:19:35
@emilazy:matrix.orgemily https://github.com/NixOS/nixpkgs/commit/1cf3103bcaf3b45aed2e8e0801f96207d2e98745 seems like a legitimate use case since it is required to match the filename format for passAsFile? 16:20:24
@emilazy:matrix.orgemilythough admittedly I don't know if there are stability guarantees on that format16:20:31
@raitobezarius:matrix.orgraitobezariusOf an absolutely undocumented thing16:20:34
@raitobezarius:matrix.orgraitobezarius Now, we made public and visible the mechanism for .attr- filenames 16:20:48
@emilazy:matrix.orgemilyright. but it still does not seem that weird to want to compute it16:20:59
@raitobezarius:matrix.orgraitobezariusYeah, but we are mixing up multiple concerns16:21:24
@raitobezarius:matrix.orgraitobezariusThere's the overall desire of doing what the OP of that change is doing16:21:32
@raitobezarius:matrix.orgraitobezariusAnd what convertHash should be and how should it serve16:21:39
@emilazy:matrix.orgemily the brew-nix use was admittedly pretty trivial https://github.com/BatteredBunny/brew-nix/commit/88a94a007fc212a04784a3dc0aab6692f405251a 16:21:44
@emilazy:matrix.orgemily but I am not sure if hash = "sha256:" + …; is going to be considered desirable long-term once sha256 = …; is deprecated in fetchers 16:21:58
@raitobezarius:matrix.orgraitobezarius

To get progress on convertHash, I can free some time to do:

  • {from,to}{NixBase32,Base64,Base16} and see what a convertHash based on that looks like
16:21:59
@raitobezarius:matrix.orgraitobezarius It's going to be crucial that convertHash exist in nixpkgs 16:22:10
@emilazy:matrix.orgemilygiven it is another quirky non-standard format vs. SRI16:22:11
@raitobezarius:matrix.orgraitobezarius And not in builtins 16:22:13
@raitobezarius:matrix.orgraitobezarius And that users prefer lib.convertHash as we usually recommend to everyone writing code in general 16:22:37
@raitobezarius:matrix.orgraitobezarius I think that having lib.convertHash = if builtins?convertHash then builtins.convertHash else (throw "convertHash is not available yet on all platforms, see <DOC LINK> about caveats and plans."); would be useful now 16:23:25
@emilazy:matrix.orgemily fwiw it seems like Nix is calling the format nix32 these days 16:23:41
@raitobezarius:matrix.orgraitobezariuslet's call it nix3216:23:48
@emilazy:matrix.orgemily I guess it would be something like builtins.fromNixBase32 { payload = …; size = 160; }? 16:23:49
@raitobezarius:matrix.orgraitobezariusI'm not yet totally fixed on the byte sizes stuff, but I am keeping this open16:24:11
@emilazy:matrix.orgemilywell it needs solving to convert hashes properly :)16:24:21
@raitobezarius:matrix.orgraitobezarius builtins.conversions.fromNixBase32 btw 16:24:24
@emilazy:matrix.orgemilyone way or another16:24:25
@raitobezarius:matrix.orgraitobezariusWe are aligned on the goal, I am doing something on the side, so I don't have all the context loaded16:24:42
@raitobezarius:matrix.orgraitobezariusIf sizes are crucial to that goal, np16:24:50
@k900:0upti.meK900tbh I still don't see the value, because like, we can't remove the <algo>:<hex> formats16:24:52
@k900:0upti.meK900And literally everything relevant uses those16:24:57
@k900:0upti.meK900Or SRI16:25:02

Show newer messages


Back to Room ListRoom Version: 10