-
Notifications
You must be signed in to change notification settings - Fork 843
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Project builds using Nix with add-gc-roots: true
fail due to removal of nix-shell --add-root
option
#6329
Comments
add-gc-roots: true
fail due to removal of nix-shell "--add-root" option
add-gc-roots: true
fail due to removal of nix-shell "--add-root" optionadd-gc-roots: true
fail due to removal of nix-shell --add-root
option
@traleig1, thanks for reporting. While I try to work out what is going on, I note that the default value for Its effect is at fullArgs = concat
[ [ "--pure" | pureShell ]
, if addGCRoots -- <<<< True if add-gc-roots is true
then [ "--indirect"
, "--add-root"
, toFilePath
(configWorkDir config)
F.</> "nix-gc-symlinks"
F.</> "gc-root"
]
else []
, map T.unpack (nixShellOptions (configNix config))
, nixopts
, ["--run", unwords (cmnd:"$STACK_IN_NIX_EXTRA_ARGS":args')]
-- Using --run instead of --command so we cannot end up in the
-- nix-shell if stack build is Ctrl-C'd
]
...
exec "nix-shell" fullArgs |
Re
@traleig1, I am not a Nix user. Should I understand from the above links that it is |
Yes - I initially hadn't realized that I had it set in my
I'm not sure; I've never had a need to work with the Judging from the documentation for nix-shell it looks like the intention is for |
@traleig1, 'bug at their end' is also my current hypothesis. I'll raise an issue there. |
General summary
Attempting to build projects using Nix on NixOS while
add-gc-roots
is enabled produces the following, as also described in haskell/cabal#9146:Workaround is to add
add-gc-roots: false
tostack.yaml
.Steps to reproduce
flake.lock
:flake.nix
:~/.stack/config.yaml
:stack.yaml
Expected
Stack should begin attempting to build.
Actual
Stack immediately fails. Running with
--verbose
:Running via
nix develop
produces roughly the same, just with a much longer $PATH.Stack version
Method of installation
nix-env
/nix develop
Platform
The text was updated successfully, but these errors were encountered: