Closed ParetoOptimalDev closed 12 months ago
Yea, I see this too (when updating the flake-parts
input and switching mkFlake to use "inputs").
❯ nix develop
warning: Git tree '/Users/srid/code/nixos-config' is dirty
evaluating derivation 'git+file:///Users/srid/code/nixos-config#devShells.aarch64-darwin.default'zsh: segmentation fault nix develop
cc @roberth
Could you try with the environment variable GC_DONT_GC=1
?
I'm assuming because of infinte recursion it warns about?
If you make the mkFlake
invocation look exactly as suggested, taking inputs
from the @
-pattern, this does not apply to you.
Same error,
❯ GC_DONT_GC=1 nix develop
warning: Git tree '/Users/srid/code/nixos-config' is dirty
evaluating derivation 'git+file:///Users/srid/code/nixos-config#devShells.aarch64-darwin.default'zsh: segmentation fault GC_DONT_GC=1 nix develop
The issue is only on macOS; Linux works fine.
Based on srid's flake with this patch applied I have some observations evaluating on aarch64-darwin with the latest Nix.
mkFlake
produces many attributes just fine, including devShells.x86_64-linux.default
.
devShells.aarch64-darwin.default
crashes on my host with the latest nix too
nix repl
crashes in the same manner when an infinite recursion is encountered.
[139] m1@host> GC_DONT_GC=1 ~/result/bin/nix repl ~/nixos-config
Welcome to Nix 2.15.0pre20230307_ba0486f. Type :? for help.
nix-repl> let
go = as: go as;
in
{
hi = go null;
}
{ hi = zsh: segmentation fault GC_DONT_GC=1 ~/result/bin/nix repl
I was wrong, this still happens.
Note to self: the crash is silent (seems as if nix run
succeeded, but check echo $?
). This still happens.
You could try a larger stack size with ulimit -s
.
It could be a stack overflow, which I believe are somewhat rare compared to infinite recursions.
~~I tried updating it to use that form and managed to get a segmentation fault :disappointed: ~~
So doing the above steps will show that error on both x86_64 linux and darwin-arch64, but on darwin-arch64 it will segfault. I'm assuming because of infinte recursion it warns about? Not sure.
I'm trying to see if I can downgrade to the older seemingly working flake-parts for now.