Can't install etlas on NixOS
earldouglas opened this issue · 2 comments
earldouglas commented
I am having trouble installing etlas on a NixOS machine. It looks like something is expecting to find bash under /bin/bash
, which is not the case. Instead, /usr/bin/env bash
should be used.
I don't stack enough to guess whether this is a bug in stack, or the etlas installation configuration.
I have tried the 1.3.0.0
tag as well as master
as of 0ae4612
. I am on NixOS 18.03.132865.411cc559c05.
Here's the output:
$ stack install etlas
Preparing to install GHC to an isolated location.
This will not interfere with any system-level installation.
Already downloaded.
Running /home/james/.stack/programs/x86_64-linux/ghc-7.10.3.temp/ghc-7.10.3/configure --prefix=/home/james/.stack/programs/x86_64-linux/ghc-7.10.3/ in directory /home/james/.stack/programs/x86_64-linux/ghc-7.10.3.temp/ghc-7.10.3/ exited with ExitFailure 1
checking for path to top of build tree...
/home/james/.stack/programs/x86_64-linux/ghc-7.10.3.temp/ghc-7.10.3/configure: utils/ghc-pwd/dist-install/build/tmp/ghc-pwd-bindist: /bin/bash: bad interpreter: No such file or directory
configure: error: cannot determine current directory
Error: Error encountered while configuring GHC with
/home/james/.stack/programs/x86_64-linux/ghc-7.10.3.temp/ghc-7.10.3/configure --prefix=/home/james/.stack/programs/x86_64-linux/ghc-7.10.3/
run in /home/james/.stack/programs/x86_64-linux/ghc-7.10.3.temp/ghc-7.10.3/
The following directories may now contain files, but won't be used by stack:
- /home/james/.stack/programs/x86_64-linux/ghc-7.10.3.temp/
- /home/james/.stack/programs/x86_64-linux/ghc-7.10.3/
Configuring GHC ...
earldouglas commented
The problem was user error. I simply needed to include the --nix
flag:
$ stack --nix --nix-packages zlib install etlas
See: https://docs.haskellstack.org/en/stable/nix_integration/#use-stack-as-normal
puffnfresh commented
Alternatively, you can use the Nix code in https://github.com/typelead/eta