nixpkgs/pkgs/os-specific/linux/nvidia-x11
Sergei Trofimovich 9c51fb0606 nvidia-x11: add an assert that useSettings implies more than libsOnly
Without the change `primusLib.glvnd.settings` fails the eval without a
chance of recovery (uncatchable error):

    $ NIXPKGS_ALLOW_UNFREE=1 nix build --no-link -f. primusLib.glvnd.settings
    error:
       … while calling the 'derivationStrict' builtin

         at /derivation-internal.nix:9:12:

            8|
            9|   strict = derivationStrict drvAttrs;
             |            ^
           10|

       … while evaluating derivation 'nvidia-settings-545.29.06'
         whose name attribute is located at pkgs/stdenv/generic/make-derivation.nix:348:7

       … while evaluating attribute 'postPatch' of derivation 'nvidia-settings-545.29.06'

         at pkgs/os-specific/linux/nvidia-x11/settings.nix:81:3:

           80|
           81|   postPatch = lib.optionalString nvidia_x11.useProfiles ''
             |   ^
           82|     sed -i 's,/usr/share/nvidia/,${nvidia_x11.bin}/share/nvidia/,g' src/gtk+-2.x/ctkappprofile.c

       error: attribute 'bin' missing

       at pkgs/os-specific/linux/nvidia-x11/settings.nix:82:36:

           81|   postPatch = lib.optionalString nvidia_x11.useProfiles ''
           82|     sed -i 's,/usr/share/nvidia/,${nvidia_x11.bin}/share/nvidia/,g' src/gtk+-2.x/ctkappprofile.c
             |                                    ^
           83|   '';

After the change `builtins.tryEval` can catch errors thrown by `assert`.
2024-01-05 10:39:00 +00:00
..
builder.sh
default.nix linuxPackages.nvidiaPackages.legacy_340: fix up to kernel 6.7 2024-01-03 13:41:36 +01:00
fabricmanager.nix nvidia_x11.dc_535: 535.129.03 2023-12-15 18:20:42 +07:00
generic.nix nvidia-x11: add an assert that useSettings implies more than libsOnly 2024-01-05 10:39:00 +00:00
open.nix linuxPackages.nvidia_x11: 545.29.02 -> 545.29.06 2023-11-22 20:40:21 +01:00
persistenced.nix treewide: don't use pname for mainProgram where pname is static 2023-12-20 14:25:55 +01:00
settings.nix linuxPackages.nvidia_x11: 530.41.03 -> 545.29.02 2023-11-01 11:24:17 +01:00