!lymvtcwDJ7ZA9Npq:lix.systems

Lix Development

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

Load older messages


SenderMessageTime
14 Oct 2025
* @raitobezarius:matrix.orgraitobezarius is not going to debate the need of convertHash or not for end user code 16:28:59
@emilazy:matrix.orgemilyI'm ambivalent. I'm not really trying to push for it. I'm just noting that it's something that comes up fairly often and that we've had Nixpkgs hash divergence from attempts at feature detecting it16:29:18
@emilazy:matrix.orgemilythe demand is not from me, but there is demand :)16:29:23
@k900:0upti.meK900Which is objectively useless16:29:37
@k900:0upti.meK900 And could just be "sha256:" + hash 16:29:43
@raitobezarius:matrix.orgraitobezariusOK, I wondered if you as a Nixpkgs core team person, had any idea of a timeline given the demand16:29:45
@raitobezarius:matrix.orgraitobezariusBut unknown timeline works for me, I will register this as low priority (aka when I'm bored)16:29:55
@emilazy:matrix.orgemily sha256 = …; is certainly likely to be banned in Nixpkgs at some point I think 16:29:57
@emilazy:matrix.orgemilysince people have already put work into treewides/warnings for it16:30:06
@k900:0upti.meK900 It doesn't have to be passed in as sha256 = 16:30:09
@k900:0upti.meK900 hash = "sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" works 16:30:30
@k900:0upti.meK900(is this stupid? yes. are we stuck with it? also yes)16:30:35
@emilazy:matrix.orgemily sha256:… is worse IMO, since that is just a pretty arbitrary non-standard format 16:30:36
@emilazy:matrix.orgemilyAIUI on the Nix end at least it's explicitly considered legacy/compat16:30:43
@k900:0upti.meK900 Yes but it's a format we already have that doesn't require exposing weird API surface for the problem that convertHash is used to actually solve 16:31:09
@emilazy:matrix.orgemily as in if I had to choose between proliferating sha256 = …; and hash = "sha256:" + …; I'd pick the former 16:31:23
@k900:0upti.meK900 And if we ever end up in a world where only SRI is accepted, I'd rather have a builtins.legacyHashToSRI or whatever 16:31:41
@emilazy:matrix.orgemilyI mean… a built-in that thinks about hash formats is exactly what Raito is so opposed to AIUI16:32:09
@emilazy:matrix.orgemily I would just implement convertHash because it doesn't seem that bad to me :) 16:32:18
@weethet:catgirl.cloudWeetHet Does nixpkgs need convertHash? 16:33:25
@emilazy:matrix.orgemily maybe hash = { algo = "sha256"; format = "nix32"; digest = …; } would be nice. 16:33:32
@weethet:catgirl.cloudWeetHetOut of tree people can just use IFD16:33:36
@k900:0upti.meK900 Actually that would be very nice 16:33:47
@k900:0upti.meK900I think16:33:50
@emilazy:matrix.orgemilysee https://github.com/NixOS/nixpkgs/pull/45192916:33:59
@k900:0upti.meK900That's almost a good abstraction16:34:03
@weethet:catgirl.cloudWeetHetIsn't nixpkgs minimum nix version still 2.18?16:36:56
@emilazy:matrix.orgemilybut if the implementation is going to consume those structured formats, then there's an argument for a built-in to convert them :)16:37:15
@emilazy:matrix.orgemilythe feature detection is precisely what caused the hash divergence.16:37:31
@weethet:catgirl.cloudWeetHetWell yes, but how did the original PR even get accepted if it would cause different results on 2.18 and whatever the current version of nix is16:39:09

Show newer messages


Back to Room ListRoom Version: 10