首页 > 解决方案 > Nix 无法使用包构建 Haskell

问题描述

当我尝试跑步时

nix-shell -p "haskellPackages.ghcWithPackages (p: [p.brick])"

我收到以下错误

these derivations will be built:
  /nix/store/14r35fzyw3y7mqzdzifbm9sd0599b1cl-ghc-8.6.5-with-packages.drv
building '/nix/store/14r35fzyw3y7mqzdzifbm9sd0599b1cl-ghc-8.6.5-with-packages.drv'...
/nix/store/k7yalpjh53xra535xaip1pfq6q4jgsc0-stdenv-linux/setup: line 822: /build/env-vars: No such file or directory
unpacking sources
/nix/store/k7yalpjh53xra535xaip1pfq6q4jgsc0-stdenv-linux/setup: line 822: /build/env-vars: No such file or directory
variable $src or $srcs should point to the source
builder for '/nix/store/14r35fzyw3y7mqzdzifbm9sd0599b1cl-ghc-8.6.5-with-packages.drv' failed with exit code 1

请注意,如果我传递一个空的包列表,则不会发生这种情况,因此nix-shell它本身可以工作。

我尝试重新安装nix-env -i ghc,但错误仍然存​​在

标签: haskellnix

解决方案


推荐阅读