在 nix-shell 中快速重新加载 nix 表达式?

dan*_*bst 7 nixos nix

当我运行 nix-shell 时

nix-shell ~/dev/nixpkgs -A pythonPackages.some-package

然后编辑阶段pythonPackages.some-package,如何nix-shell使用新更改重新加载环境?

退出nix-shell并重新运行是一种选择,但还有其他选择吗?

小智 6

没有其他简单的选择,抱歉。我只能想到重写 nix-shell 来完成你想要的。恐怕也没有那么难。重新解析表达式,清理环境并重新填充环境。