Trying to upgrade throws an error:
nixos-rebuild switch --upgrade
unpacking channels...
building Nix...
building the system configuration...
error: value is null while a set was expected, at /nix/store/1ka8pv78p0p9c3h8qb892f8xb23zv9a0-nixos-17.09/nixos/pkgs/os-specific/linux/nvidia-x11/generic.nix:65:52
(use '--show-trace' to show detailed location information)
With '--show-trace':
nixos-rebuild switch --upgrade --show-trace (1)
unpacking channels...
building Nix...
building the system configuration...
error: while evaluating the attribute 'activationScript' of the derivation 'nixos-system-rogue-17.09.2498.a9ffb7b0b5a' at /nix/store/1ka8pv78p0p9c3h8qb892f8xb23zv9a0-nixos-17.09/nixos/pkgs/stdenv/generic/make-derivation.nix:98:11:
while evaluating the attribute 'system.activationScripts.script' at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/nixos/modules/system/activation/activation-script.nix:62:9:
while evaluating 'textClosureMap' at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/strings-with-deps.nix:70:35, called from /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/nixos/modules/system/activation/activation-script.nix:83:18:
while evaluating 'textClosureList' at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/strings-with-deps.nix:54:33, called from /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/strings-with-deps.nix:71:35:
while evaluating 'f' at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/strings-with-deps.nix:56:17, called from /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/strings-with-deps.nix:68:9:
while evaluating 'mapAttrs' at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/attrsets.nix:198:17, called from /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/nixos/modules/system/activation/activation-script.nix:82:33:
while evaluating 'mapAttrs' at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/attrsets.nix:198:17, called from /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/nixos/modules/system/activation/activation-script.nix:81:24:
while evaluating the attribute 'mergedValue' at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/modules.nix:339:5:
while evaluating anonymous function at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/modules.nix:339:32, called from /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/modules.nix:339:19:
while evaluating 'merge' at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/types.nix:203:20, called from /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/modules.nix:342:8:
while evaluating 'mapAttrs' at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/attrsets.nix:198:17, called from /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/types.nix:204:9:
while evaluating 'filterAttrs' at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/attrsets.nix:115:23, called from /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/types.nix:204:35:
while evaluating 'concatMap' at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/lists.nix:102:18, called from /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/attrsets.nix:116:18:
while evaluating anonymous function at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/attrsets.nix:116:29, called from undefined position:
while evaluating anonymous function at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/types.nix:204:51, called from /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/attrsets.nix:116:62:
while evaluating the attribute 'setup-opengl' at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/attrsets.nix:334:7:
while evaluating anonymous function at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/types.nix:204:86, called from /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/attrsets.nix:334:15:
while evaluating the attribute 'optionalValue' at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/modules.nix:346:5:
while evaluating 'filterOverrides' at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/modules.nix:419:21, called from /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/modules.nix:328:18:
while evaluating 'concatMap' at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/lists.nix:102:18, called from /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/modules.nix:425:8:
while evaluating 'concatMap' at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/lists.nix:102:18, called from /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/modules.nix:323:17:
while evaluating anonymous function at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/modules.nix:323:28, called from undefined position:
while evaluating 'dischargeProperties' at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/modules.nix:386:25, called from /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/modules.nix:324:62:
while evaluating the attribute 'value' at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/types.nix:209:55:
while evaluating the attribute 'setup-opengl' at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/nixos/modules/hardware/opengl.nix:123:5:
while evaluating the attribute 'passAsFile' of the derivation 'opengl-drivers-32bit' at /nix/store/1ka8pv78p0p9c3h8qb892f8xb23zv9a0-nixos-17.09/nixos/pkgs/stdenv/generic/make-derivation.nix:98:11:
while evaluating the attribute 'passAsFile' of the derivation 'nvidia-libs' at /nix/store/1ka8pv78p0p9c3h8qb892f8xb23zv9a0-nixos-17.09/nixos/pkgs/stdenv/generic/make-derivation.nix:98:11:
while evaluating the attribute 'nativeBuildInputs' of the derivation 'nvidia-x11-384.98' at /nix/store/1ka8pv78p0p9c3h8qb892f8xb23zv9a0-nixos-17.09/nixos/pkgs/stdenv/generic/make-derivation.nix:98:11:
while evaluating 'chooseDevOutputs' at /nix/store/1ka8pv78p0p9c3h8qb892f8xb23zv9a0-nixos-17.09/nixos/lib/attrsets.nix:460:22, called from undefined position:
value is null while a set was expected, at /nix/store/1ka8pv78p0p9c3h8qb892f8xb23zv9a0-nixos-17.09/nixos/pkgs/os-specific/linux/nvidia-x11/generic.nix:65:52
cat /nix/store/1ka8pv78p0p9c3h8qb892f8xb23zv9a0-nixos-17.09/nixos/pkgs/os-specific/linux/nvidia-x11/generic.nix | nl -ba (1)
1 { version
2 , sha256_32bit
3 , sha256_64bit
4 , settingsSha256
5 , persistencedSha256
6 , useGLVND ? true
7 , useProfiles ? true
8 , preferGtk2 ? false
9
10 , prePatch ? ""
11 , patches ? []
12 }:
13
14 { stdenv, callPackage, callPackage_i686, fetchurl, fetchpatch
15 , kernel ? null, xorg, zlib, perl, nukeReferences
16 , # Whether to build the libraries only (i.e. not the kernel module or
17 # nvidia-settings). Used to support 32-bit binaries on 64-bit
18 # Linux.
19 libsOnly ? false
20 }:
21
22 with stdenv.lib;
23
24 assert (!libsOnly) -> kernel != null;
25
26 let
27 nameSuffix = optionalString (!libsOnly) "-${kernel.version}";
28 pkgSuffix = optionalString (versionOlder version "304") "-pkg0";
29
30 self = stdenv.mkDerivation {
31 name = "nvidia-x11-${version}${nameSuffix}";
32
33 builder = ./builder.sh;
34
35 src =
36 if stdenv.system == "i686-linux" then
37 fetchurl {
38 url = "https://download.nvidia.com/XFree86/Linux-x86/${version}/NVIDIA-Linux-x86-${version}${pkgSuffix}.run";
39 sha256 = sha256_32bit;
40 }
41 else if stdenv.system == "x86_64-linux" then
42 fetchurl {
43 url = "https://download.nvidia.com/XFree86/Linux-x86_64/${version}/NVIDIA-Linux-x86_64-${version}${pkgSuffix}.run";
44 sha256 = sha256_64bit;
45 }
46 else throw "nvidia-x11 does not support platform ${stdenv.system}";
47
48 patches = if libsOnly then null else patches;
49 inherit prePatch;
50 inherit version useGLVND useProfiles;
51 inherit (stdenv) system;
52
53 outputs = [ "out" ] ++ optional (!libsOnly) "bin";
54 outputDev = if libsOnly then null else "bin";
55
56 kernel = if libsOnly then null else kernel.dev;
57
58 hardeningDisable = [ "pic" "format" ];
59
60 dontStrip = true;
61 dontPatchELF = true;
62
63 libPath = makeLibraryPath [ xorg.libXext xorg.libX11 xorg.libXv xorg.libXrandr zlib stdenv.cc.cc ];
64
-> 65 nativeBuildInputs = [ perl nukeReferences ] ++ kernel.moduleBuildDependencies;
66
67 disallowedReferences = optional (!libsOnly) [ kernel.dev ];
68
69 passthru = {
70 settings = callPackage (import ./settings.nix self settingsSha256) {
71 withGtk2 = preferGtk2;
72 withGtk3 = !preferGtk2;
73 };
74 persistenced = mapNullable (hash: callPackage (import ./persistenced.nix self hash) { }) persistencedSha256;
75 };
76
77 meta = with stdenv.lib; {
78 homepage = http://www.nvidia.com/object/unix.html;
79 description = "X.org driver and kernel module for NVIDIA graphics cards";
80 license = licenses.unfreeRedistributable;
81 platforms = platforms.linux;
82 maintainers = [ maintainers.vcunat ];
83 priority = 4; # resolves collision with xorg-server's "lib/xorg/modules/extensions/libglx.so"
84 };
85 };
86
87 in self
services.xserver = { # Enable the X11 windowing system.
videoDrivers = [ "nvidia" ]; # Proprietary nVidia driver
};
hardware = {
cpu.intel.updateMicrocode = true;
enableAllFirmware = true;
# Enable 32bit acceleration
opengl.driSupport32Bit = true;
};
"x86_64-linux"Linux 4.9.68, NixOS, 17.09.2498.a9ffb7b0b5a (Hummingbird)yesnonix-env (Nix) 1.12pre5788_e3013543"nixos-17.09, unstable-18.03pre123130.1bc288591ea"""/nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgsI'm also getting this issue with both "nvidia" and "nvidiaBeta".
I can not reproduce it, and since your nix-info reports that you already are on a9ffb7b0b5a, but the latest nixos-17.09 release is the same, it does not look like anything in Nixpkgs has changed to cause this failure.
I'm encountering the same issue.
The first broken commit is 708b151c9d5ebd6572457cb182b1a33551e579a2, cc @fpletz
Parts of nvidia driver are built without kernel, in which case kernel.moduleBuildDependencies should not be added.
The following fixes the issue:
@@ -62,7 +62,7 @@ let
libPath = makeLibraryPath [ xorg.libXext xorg.libX11 xorg.libXv xorg.libXrandr zlib stdenv.cc.cc ];
- nativeBuildInputs = [ perl nukeReferences ] ++ kernel.moduleBuildDependencies;
+ nativeBuildInputs = [ perl nukeReferences ] ++ optionals (!libsOnly) kernel.moduleBuildDependencies;
disallowedReferences = optional (!libsOnly) [ kernel.dev ];
Is fixed on master with 9fe81b5ac2bca0577042e43483096f50c46e4dbb and release-17.09 with 9fe81b5ac2bca0577042e43483096f50c46e4dbb.
Thank you 8)
Happy New Year everyone!
Can I be dumb, and ask what is the right NixOS way to fix *this state of system.
For it to update out of this.
It seems the 17.09 channel is not updating because of a failing test
https://hydra.nixos.org/build/66945420
In any case, you can upgrade using
nixos-rebuild switch -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/9fe81b5ac2bca0577042e43483096f50c46e4dbb.tar.gz
@FRidh Thank you 馃憤
The channel updated in the meantime, and should contain the fix. Commit 9fe81b5ac2bc above isn't on 17.09 but on unstable.
Most helpful comment
Parts of nvidia driver are built without kernel, in which case
kernel.moduleBuildDependenciesshould not be added.The following fixes the issue: