我可以看到NixOS有以下版本可供安装:
...
nodejs-0.10-statsd-0.7.2
nodejs-0.10.42
nodejs-4.3.1
nodejs-5.9.0
...
然而,systemPackages不允许我安装nodejs-5.9.0
,因为它抱怨说:
error: syntax error, unexpected INT, expecting ID or OR_KW or DOLLAR_CURLY or '"', at /etc/nixos/configuration.nix:49:14
(use ‘--show-trace’ to show detailed location information)
error: syntax error, unexpected INT, expecting ID or OR_KW or DOLLAR_CURLY or '"', at /etc/nixos/configuration.nix:49:14
(use ‘--show-trace’ to show detailed location information)
building the system configuration...
error: syntax error, unexpected INT, expecting ID or OR_KW or DOLLAR_CURLY or '"', at /etc/nixos/configuration.nix:49:14
(use ‘--show-trace’ to show detailed location information)
这让我想到我做错了什么。我不想只用
nix-env -i ...
安装,因为我希望它是系统级的(而且我正在为所有开发机器构建我的标准NixOS配置)。根据nixpkgs存储库,v6可用,但我不知道如何通过configuration.nix或其他方式告诉
nixos-rebuild
如何安装它。我该如何正确配置才能安装最新版本的NodeJS,或者特别是5.9.0?