【发布时间】:2017-07-10 21:45:11
【问题描述】:
我正在尝试使用 nix-shell 作为 #! runghc 的包装器,如手册页中所建议的那样。但它找不到库。给定以下示例,从手册页中删减
#! /usr/bin/env nix-shell
#! nix-shell -i runghc -p haskellPackages.HTTP
import Network.HTTP
main = return ()
我得到以下结果:
[~:0]$ ./nixshelltest
nixshelltest:4:1: error:
Failed to load interface for ‘Network.HTTP’
Use -v to see a list of the files searched for.
[~:1]$
在我看来,这正是 nix-shell -p 应该避免的。
是我做错了什么,没有抓住重点,还是有错误?这既是在 nixOS 17.03 主机上,也是在 Ubuntu 之上运行 nix 17.09 的主机。
谢谢,
【问题讨论】: