!VRULIdgoKmKPzJZzjj:nixos.org

Nix Package Manager development

837 Members
For people hacking on Nix: https://github.com/NixOS/nix Nix maintainers can be reached here.180 Servers

Load older messages


SenderMessageTime
14 Sep 2025
@xworld21:matrix.org@xworld21:matrix.org left the room.18:37:24
15 Sep 2025
@xokdvium:matrix.orgSergei Zimmerman (xokdvium)Btw here's the manifistation of this fever dream of mine: https://github.com/NixOS/nix/pull/1398700:16:54
16 Sep 2025
@getchoo:matrix.orggetchoo i think i have a decent solution here: https://github.com/getchoo-contrib/nix/tree/getchoo/dogfood-experimental-installer
it currently grabs the artifacts the 0.27.0, but it wouldn't be too hard to extend to fetch from the main branch builds (if they actually uploaded their artifacts)
dogfooding even works as well! ...but i did come across an interesting problem
04:18:02
@getchoo:matrix.orggetchoo when dogfooding is an enabled with this experimental installer option, you'll end up with an 4: Failed to execute command HOME="/root" "/nix/store/dkmylx2wyz9i6ycbmr07lpv15mph0d7y-nix-main-2.32.0pre/bin/nix-store" "--load-db"`` error
i traced it back to this pretty naive snippet of code that basically just takes the first path in the store matching nix-* and runs it, with no checks for if /bin/nix-store actually exists https://github.com/NixOS/experimental-nix-installer/blob/20be610e1f29c8a127146da67ed56f879b173ac6/src/action/base/setup_default_profile.rs#L55-L70
04:19:47
@getchoo:matrix.orggetchoo this worked before the component split in 2.29 since there would only be one main nix store path at this point, but now it matches the nix-main store path first, which doesn't a bin dir or any of the nix binaries 04:21:02
@getchoo:matrix.orggetchooi figured this was something probably fixed in an update upstream and i'd need to wait on a rebase, but the code there actually remains entirely the same https://github.com/DeterminateSystems/nix-installer/blob/8a7bb095d93ada552d20d2f22ffd9f1668f8e394/src/action/base/setup_default_profile.rs#L56-L6904:22:07
@getchoo:matrix.orggetchoo i think this might only work because the hash part of the release nix store path happens to be sorted before the other components, while it isn't in the pre-release tarball from the artifacts i'm pushing into this lol 04:33:40
@getchoo:matrix.orggetchoo * when dogfooding is enabled with this experimental installer option, you'll end up with an 4: Failed to execute command HOME="/root" "/nix/store/dkmylx2wyz9i6ycbmr07lpv15mph0d7y-nix-main-2.32.0pre/bin/nix-store" "--load-db"`` error
i traced it back to this pretty naive snippet of code that basically just takes the first path in the store matching nix-* and runs it, with no checks for if /bin/nix-store actually exists https://github.com/NixOS/experimental-nix-installer/blob/20be610e1f29c8a127146da67ed56f879b173ac6/src/action/base/setup_default_profile.rs#L55-L70
04:33:57
@getchoo:matrix.orggetchoo * when dogfooding is enabled with this experimental installer option, you'll end up with an 4: Failed to execute command \HOME="/root" "/nix/store/dkmylx2wyz9i6ycbmr07lpv15mph0d7y-nix-main-2.32.0pre/bin/nix-store" "--load-db"`error i traced it back to this pretty naive snippet of code that basically just takes the first path in the store matchingnix-*and runs it, with no checks for if/bin/nix-store` actually exists https://github.com/NixOS/experimental-nix-installer/blob/20be610e1f29c8a127146da67ed56f879b173ac6/src/action/base/setup_default_profile.rs#L55-L70 04:34:15
@getchoo:matrix.orggetchoo * when dogfooding is enabled with this experimental installer option, you'll end up with an 4: Failed to execute command \HOME="/root" "/nix/store/dkmylx2wyz9i6ycbmr07lpv15mph0d7y-nix-main-2.32.0pre/bin/nix-store" "--load-db"` error i traced it back to this pretty naive snippet of code that basically just takes the first path in the store matchingnix-*and runs it, with no checks for if/bin/nix-store` actually exists https://github.com/NixOS/experimental-nix-installer/blob/20be610e1f29c8a127146da67ed56f879b173ac6/src/action/base/setup_default_profile.rs#L55-L70 04:34:31
@getchoo:matrix.orggetchoo * when dogfooding is enabled with this experimental installer option, you'll end up with an 4: Failed to execute command \HOME="/root" "/nix/store/dkmylx2wyz9i6ycbmr07lpv15mph0d7y-nix-main-2.32.0pre/bin/nix-store" "--load-db"`` error i traced it back to this pretty naive snippet of code that basically just takes the first path in the store matchingnix-\*and runs it, with no checks for if/bin/nix-store\ actually exists https://github.com/NixOS/experimental-nix-installer/blob/20be610e1f29c8a127146da67ed56f879b173ac6/src/action/base/setup_default_profile.rs#L55-L70 04:34:42
@getchoo:matrix.orggetchoo *

when dogfooding is enabled with this experimental installer option, you'll end up with an error like this

4: Failed to execute command `HOME="/root" "/nix/store/dkmylx2wyz9i6ycbmr07lpv15mph0d7y-nix-main-2.32.0pre/bin/nix-store" "--load-db"`

i traced it back to this pretty naive snippet of code that basically just takes the first path in the store matchingnix-\*and runs it, with no checks for if/bin/nix-store\ actually exists https://github.com/NixOS/experimental-nix-installer/blob/20be610e1f29c8a127146da67ed56f879b173ac6/src/action/base/setup_default_profile.rs#L55-L70

04:35:11
@getchoo:matrix.orggetchoodoes seem to be the case after re-rolling the hash on a new revision. reported it https://github.com/NixOS/experimental-nix-installer/issues/47 and opened up a draft of everything in https://github.com/NixOS/nix/pull/14002. i'm pretty sure it's in a good state, minus this bug?06:13:53
@getchoo:matrix.orggetchoo* does seem to be the case after re-rolling the hash on a new revision. reported it in https://github.com/NixOS/experimental-nix-installer/issues/47 and opened up a draft of everything in https://github.com/NixOS/nix/pull/14002. i'm pretty sure it's in a good state, minus this bug?06:14:06
@getchoo:matrix.orggetchoointeresting, lix's fork of the installer doesn't have this issue: https://git.lix.systems/lix-project/lix-installer/src/commit/e4048682396999c11069f99f9b323f1d4a333bbc/src/action/base/setup_default_profile.rs#L57 seems to go back to an earlier implementation that was removed after they forked in https://github.com/DeterminateSystems/nix-installer/commit/16ee60a2f7d5d172db91484729f15dd09d0e538306:28:04
@getchoo:matrix.orggetchoo

....nevermind

$ ls -d nix-tarball/nix-2.32.0pre20250915_5e17a3f-x86_64-linux/store/*-[nl]ix-*.*.* | head -n 1
nix-tarball/nix-2.32.0pre20250915_5e17a3f-x86_64-linux/store/dkmylx2wyz9i6ycbmr07lpv15mph0d7y-nix-main-2.32.0pre
06:37:04
@joerg:thalheim.ioMic92 getchoo: should we just fix the regex? 11:22:45
@joerg:thalheim.ioMic92by making it more specific11:23:01
@matthewcroughan:defenestrate.itmatthewcroughan Why is it git+file and not git+path 13:27:26
@toonn:matrix.orgtoonn Extension of the file protocol? 13:35:23
@matthewcroughan:defenestrate.itmatthewcroughanbut the argument you pass it, is a path, not a file14:27:22
@matthewcroughan:defenestrate.itmatthewcroughan git+file:/home/foo is not a file, but this is necessary 14:27:35
@matthewcroughan:defenestrate.itmatthewcroughan it should be git+path:/home/foo 14:27:49
@dramforever:matrix.orgdramforever git calls it file https://git-scm.com/book/ms/v2/Git-on-the-Server-The-Protocols 14:32:20
@dramforever:matrix.orgdramforever i think path: is a nix invention... probably 14:33:06
@toonn:matrix.orgtoonn matthewcroughan: I meant as an extension of the file URI scheme, file:///some/path . 14:34:48
@getchoo:matrix.orggetchoo
In reply to @joerg:thalheim.io
by making it more specific
that’s what i was thinking
we could also iterate over the glob matches and use the first one that actually has a /bin/nix subpath as well to be a bit safer (since i really doubt the day will come where we have multiple nix binaries in the store during install)
16:51:32
@getchoo:matrix.orggetchoo* this worked before the component split in 2.29 since there would only be one main nix store path at this point, but now it matches the nix-main store path first, which doesn't have a bin dir or any of the nix binaries16:52:24
@joerg:thalheim.ioMic92
In reply to @getchoo:matrix.org
that’s what i was thinking
we could also iterate over the glob matches and use the first one that actually has a /bin/nix subpath as well to be a bit safer (since i really doubt the day will come where we have multiple nix binaries in the store during install)
Is this not just scanning the installation tarball rather the entire nix store?
20:22:46
@joerg:thalheim.ioMic92I haven't looked to deep into the code. 20:23:13

Show newer messages


Back to Room ListRoom Version: 6