!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
@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
@emilazy:matrix.orgemilyhow would that be tested?16:39:58
@emilazy:matrix.orgemilyNix 2.18 is EOL16:40:06
@emilazy:matrix.orgemilyhttps://github.com/NixOS/nixpkgs/pull/451926 will check hashes of Lix vs. Nix, but has not been implemented yet, that is how this was found16:40:26
@qyriad:katesiria.orgQyriad not if we accept hash = { algo, format, digest }; in FODs too, right? 17:43:09
@emilazy:matrix.orgemilynot sure what you mean17:45:04
@emilazy:matrix.orgemily I mean that if { algo, format, digest } is considered a "first-class" thing the implementation is consuming then it doesn't seem so weird to have a built-in that converts it at that point 17:45:26
@emilazy:matrix.orgemily(the other potential use-cases like producing Nix32 filenames and converting lock file formats would remain regardless)17:45:44
@qyriad:katesiria.orgQyriad Filenames and lockfiles are a point in favor, but if the implementation consumes { algo, format, digest } in any form then you specifically wouldn't need to convert between them, no? 17:46:54
@emilazy:matrix.orgemily I am not saying that you would need to convert them to pass them to a FOD fetcher. I'm saying that if the objection to a convertHash is "this is doing too much because these structured hashes aren't really a first-class implementation concept", but then you add support for structured hashes to FODs, then they are a first-class implementation concept and it doesn't seem too weird to have a conversion built-in for them. 17:50:30
@emilazy:matrix.orgemily(and then that conversion built-in would be useful for the other use caess)17:50:41
@qyriad:katesiria.orgQyriadAhh18:00:08
* @qyriad:katesiria.orgQyriad nods18:00:10
@emilazy:matrix.orgemilyis there actually a reliable way to feature detect NULs in strings currently?19:29:19

Show newer messages


Back to Room ListRoom Version: 10