【发布时间】:2021-06-29 15:23:42
【问题描述】:
我正在使用https://github.com/Mic92/nixos-shell 构建/运行虚拟机。
在此 VM 中,我尝试运行 nixos-shell,它最初因错误而失败,但在添加后:
{...}: {
nix.nixPath = [
"nixpkgs=${pkgs.path}"
];
}
它现在可以工作了,但是在尝试通过 nix-shell 调用某些东西时,它似乎正在下载应该已经存在于主机中的依赖项。
nix-shell -p vim /bambie
these paths will be fetched (7.00 MiB download, 33.13 MiB unpacked):
/nix/store/1cbk7i6dg26cygss2b6w8xq4dnj50z31-vim-8.2.1522
copying path '/nix/store/1cbk7i6dg26cygss2b6w8xq4dnj50z31-vim-8.2.1522' from 'https://cache.nixos.org'...
^Cerror: interrupted by the user
为什么会这样?当路径 (/nix/store/1cbk7i6dg26cygss2b6w8xq4dnj50z31-vim-8.2.1522) 出现在 VM 上时(我这样说是因为当我执行 ls /nix/store/1cbk7i6dg26cygss2b6w8xq4dnj50z31-vim-8.2.1522 时它就出现了)?
【问题讨论】: