首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >nix-shell找不到标准属性

nix-shell找不到标准属性
EN

Stack Overflow用户
提问于 2020-01-19 16:36:10
回答 1查看 733关注 0票数 0

我正在运行nixos 19.09,并试图与使用说明一起创建一个红宝石包。但是,在第一步中,我得到了一个无法找到withPackages属性的错误。

命令:$ nix-shell -p "ruby.withPackages (ps: with ps; [ nokogiri pry ])" --show-trace

结果:

代码语言:javascript
复制
while evaluating the attribute 'buildInputs' of the derivation 'shell' at /nix/store/b6cqdsczmwxfkmc65483x7fgwdl129ar-nixpkgs-19.03.173684.c8db7a8a16e/nixpkgs/pkgs/build-support/trivial-builders.nix:7:14:
while evaluating 'getOutput' at /nix/store/b6cqdsczmwxfkmc65483x7fgwdl129ar-nixpkgs-19.03.173684.c8db7a8a16e/nixpkgs/lib/attrsets.nix:464:23, called from undefined position:
while evaluating anonymous function at /nix/store/b6cqdsczmwxfkmc65483x7fgwdl129ar-nixpkgs-19.03.173684.c8db7a8a16e/nixpkgs/pkgs/stdenv/generic/make-derivation.nix:141:17, called from undefined position:
attribute 'withPackages' missing, at (string):1:94

我猜我把我的nix商店搞砸了,但我不知道怎么调试它。

其他信息

代码语言:javascript
复制
$ echo $NIX_PATH
$HOME/.nix-defexpr/channels:nixpkgs=/nix/var/nix/profiles/per-user/root/channels/nixos:nixos-config=/etc/nixos/configuration.nix:/nix/var/nix/profiles/per-user/root/channels
代码语言:javascript
复制
$ nix-channel --list
nixpkgs https://nixos.org/channels/nixos-19.03
unstable https://nixos.org/channels/nixos-unstable
代码语言:javascript
复制
$ sudo nix-channel --list
<blank>
EN

回答 1

Stack Overflow用户

发布于 2020-01-19 20:46:51

在@RobertHensing指出我好像在19.03,并要求我打印我的频道后,我尝试更新频道列表,以指向19.09而不是19.03 (用nix-channel --add),然后修复了它。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/59812131

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档