stack2nix
stack2nix copied to clipboard
Running stack2nix on a folder without stack.yaml results into obscure error
$ ~/.local/bin/stack2nix . > foo.nix
Ensuring cabal2nix version is >= 2.2.1 ...
Ensuring git version is >= 2 ...
Ensuring cabal version is >= 1 ...
stack2nix: Failed with exit code 128...
"fatal: repository '.' does not exist\n"
The issue is that stack init is called to late, stack2nix figures out that stack.yaml doesn't exist and fallbacks to git cloning.
Solved with #82
Actually this still happens:
$ ~/.local/bin/stack2nix .
Ensuring git version is >= 2 ...
Ensuring cabal version is >= 2 ...
Ensuring ghc version is >= 8.0 ...
stack2nix: Failed with exit code 128...
"fatal: repository '.' does not exist\n"
CallStack (from HasCallStack):
error, called at src/Stack2nix/External/Util.hs:21:3 in stack2nix-0.1.3.1-4fGTxbQftWE1cIvji4P4v6:Stack2nix.External.Util