stack2nix
stack2nix copied to clipboard
Runtime-dependency on cabal executable?
I got this:
Ensuring cabal version is >= 2 ...
stack2nix: ERROR: cabal version must be 2 or higher. Current version: 1.22.6.0
CallStack (from HasCallStack):
error, called at src/Stack2nix/Util.hs:47:49 in stack2nix-0.1.3.1-3EqQ1tT1vMJGpAYSWfmhUQ:Stack2nix.Util
I see it calls cabal --version
. Why is that?
stack2nix
already link in the Cabal
library, so couldn't it use only functionality from that? Then it wouldn't care about whatever cabal
is in path (or even require it to be installed).
Another question: For now, how can I get exactly a version of the cabal
executable that's known to work with stack2nix
? Can I obtain it as part of stack2nix
's nix-shell environment?
Hmm here this was deleted: https://github.com/input-output-hk/stack2nix/commit/4e31eb8c9f4ad8431e533b3ca078c986869cc0d8#diff-04c6e90faac2675aa89e2176d2eec7d8L26:
-4. Ensure `cabal` (via `cabal-install` package), `cabal2nix` >= 2.2.1, and `stack2nix` are in your `$PATH`
Am I doing something wrong / should there not be a runtime dependency any more? (cc @domenkozar)
cabal update
is still ran to make sure hackage db is up to date. It could be made optional.
iirc stack2nix did provision itself a cabal from nixpkgs, are you using master branch?
@domenkozar Yeah I'm in 9070f9173ae32f0be6f7830c41c8cfb8e780fdbf
. In nix-shell --pure default.nix
there's no cabal
in PATH. Am I looking in the wrong spot?
Ah yeah, we should probably pin down <nixpkgs>
at https://github.com/input-output-hk/stack2nix/blob/master/src/Stack2nix/Util.hs#L73
Relevant #102