Ранее я решал эту проблему, но не помню, что делал... Поэтому решил опубликовать ее здесь, чтобы решить ее.
Я пытаюсь собрать пакет Haskell с помощью stack build nix
, я следую ответу из https://stackoverflow.com/a/47110522/1663462, но возникает ошибка:
Unpacking GHC into /home/chris/.stack/programs/x86_64-linuRunning /home/chris/.stack/programs/x86_64-linux-nix/ghc-8.0.2.temp/ghc-8.0.2/configure --prefix=/home/chris/.stack/programs/x86_64-linux-nix/ghc-8.0.2/ in directory /home/chris/.stack/programs/x86_64-linux-nix/ghc-8.0.2.temp/ghc-8.0.2/ exited with ExitFailure 1
checking for path to top of build tree...
/home/chris/.stack/programs/x86_64-linux-nix/ghc-8.0.2.temp/ghc-8.0.2/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
Как я могу это решить?
stack --nix setup
приводит к:
Preparing to install GHC to an isolated location.
This will not interfere with any system-level installation.
Already downloaded.
Running /home/chris/.stack/programs/x86_64-linux-nix/ghc-8.0.2.temp/ghc-8.0.2/configure --prefix=/home/chris/.stack/programs/x86_64-linux-nix/ghc-8.0.2/ in directory /home/chris/.stack/programs/x86_64-linux-nix/ghc-8.0.2.temp/ghc-8.0.2/ exited with ExitFailure 1
checking for path to top of build tree...
/home/chris/.stack/programs/x86_64-linux-nix/ghc-8.0.2.temp/ghc-8.0.2/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/chris/.stack/programs/x86_64-linux-nix/ghc-8.0.2.temp/ghc-8.0.2/configure --prefix=/home/chris/.stack/programs/x86_64-linux-nix/ghc-8.0.2/
run in /home/chris/.stack/programs/x86_64-linux-nix/ghc-8.0.2.temp/ghc-8.0.2/
The following directories may now contain files, but won't be used by stack:
- /home/chris/.stack/programs/x86_64-linux-nix/ghc-8.0.2.temp/
- /home/chris/.stack/programs/x86_64-linux-nix/ghc-8.0.2/
Configuring GHC ...
system-ghc: true
?false
не поддерживается в Nix - person Robert Hensing   schedule 08.08.2018