Commit Graph

573 Commits

Author SHA1 Message Date
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
esthromeris
50bfc776d4 nvidia-x11.legacy_390: fix bug
Said bug is described at https://bbs.archlinux.org/viewtopic.php?pid=2083439#p2083439
2024-01-05 11:21:02 +01:00
Kiskae
df7028691c linuxPackages.nvidiaPackages.legacy_340: fix up to kernel 6.7 2024-01-03 13:41:36 +01:00
Peder Bergebakken Sundt
2f82900699
Merge pull request #275550 from SuperSandro2000/mainProgramm
treewide: don't use pname for mainProgram where pname is static
2023-12-21 01:04:13 +01:00
Sandro Jäckel
15cf1bacec
treewide: don't use pname for mainProgram where pname is static 2023-12-20 14:25:55 +01:00
Kiskae
0066ffc744 linuxPackages.nvidia_x11_vulkan_beta: 535.43.20 -> 535.43.22 2023-12-20 13:40:37 +01:00
timothy
6e4d90f0b0 nvidia_x11.dc_535: 535.129.03 2023-12-15 18:20:42 +07:00
Nick Cao
ff932567f6
Merge pull request #272986 from Kiskae/nvidia/535.43.20
linuxPackages.nvidia_x11_vulkan_beta: 535.43.19 -> 535.43.20
2023-12-09 13:54:43 -05:00
Kiskae
28c01eec85 linuxPackages.nvidia_x11_vulkan_beta: 535.43.19 -> 535.43.20 2023-12-08 21:24:47 +01:00
Nick Cao
b9e9e53d1b
Merge pull request #272734 from Kiskae/nvidia/535.146.02
linuxPackages.nvidiaPackages.production: 535.129.03 -> 535.146.02
2023-12-07 16:38:12 -05:00
Kiskae
220e163cde linuxPackages.nvidiaPackages.production: 535.129.03 -> 535.146.02 2023-12-07 19:07:32 +01:00
Peder Bergebakken Sundt
815143af0f treewide: use lib.splitVersion 2023-12-07 07:18:41 +01:00
Kiskae
cf1efebe8c linuxPackages.nvidia_x11_vulkan_beta: 535.43.16 -> 535.43.19 2023-12-02 15:40:20 +01:00
Kiskae
9c24e11f3a nvidiaPackages.(settings|persistened): add fallback cdn 2023-11-28 15:42:39 +01:00
Kiskae
3281455a26 nvidiaPackages: format generic.nix 2023-11-28 15:17:12 +01:00
Kiskae
f409967b04 linuxPackages.nvidia_x11: 545.29.02 -> 545.29.06 2023-11-22 20:40:21 +01:00
Felix Buehler
2b816ea9b9 cudaPackages.fabricmanager: deprecate phases 2023-11-22 00:18:28 +01:00
Kiskae
1282d0ee3d linuxPackages.nvidia_x11.open: apply brightness patch 2023-11-19 14:03:10 +01:00
github-actions[bot]
1505981287
Merge master into staging-next 2023-11-07 18:00:55 +00:00
Kiskae
d8b7213174 linuxPackages.nvidia_x11_vulkan_beta: 535.43.15 -> 535.43.16 2023-11-07 08:46:04 +01:00
github-actions[bot]
cd7af6170b
Merge master into staging-next 2023-11-01 18:01:01 +00:00
Nick Cao
b01b09e7b5
Merge pull request #264614 from Kiskae/nvidia/545.29.02
linuxPackages.nvidia_x11: 530.41.03 -> 545.29.02
2023-11-01 10:31:15 -04:00
Kiskae
3ac4cd157e linuxPackages.nvidia_x11: 530.41.03 -> 545.29.02 2023-11-01 11:24:17 +01:00
github-actions[bot]
81270bbdcf
Merge master into staging-next 2023-10-31 18:01:02 +00:00
Nick Cao
2784272f5b
Merge pull request #264596 from Kiskae/nvidia/470.223.02
linuxPackages.nvidia_x11_legacy470: 470.199.02 -> 470.223.02
2023-10-31 13:44:55 -04:00
Kiskae
8a67cfb4d9 linuxPackages.nvidiaPackages.production: 535.113.01 -> 535.129.03 2023-10-31 15:56:02 +01:00
Kiskae
fa1a8826d8 linuxPackages.nvidia_x11_legacy470: 470.199.02 -> 470.223.02 2023-10-31 15:55:05 +01:00
Vladimír Čunát
d811555465
Merge branch 'staging' into staging-next 2023-10-26 10:36:50 +02:00
Kiskae
88b5796f72 linuxPackages.nvidia_x11_vulkan_beta: 535.43.13 -> 535.43.15 2023-10-25 11:29:18 +02:00
github-actions[bot]
c12ce83e4e
Merge staging-next into staging 2023-10-18 18:01:38 +00:00
Nick Cao
5b22c68288
Merge pull request #261675 from Kiskae/nvidia/545.23.06
linuxPackages.nvidia_x11_beta: 535.43.02 -> 545.23.06
2023-10-18 10:23:59 -04:00
Kiskae
5ddb3d4fab linuxPackages.nvidia_x11_beta: 535.43.02 -> 545.23.06 2023-10-17 19:58:14 +02:00
github-actions[bot]
4da0322a88
Merge staging-next into staging 2023-10-12 12:02:01 +00:00
Kiskae
2a81c6edbb linuxPackages.nvidia_x11_vulkan_beta: 535.43.11 -> 535.43.13 2023-10-11 22:35:37 +02:00
github-actions[bot]
81871f4c87
Merge staging-next into staging 2023-10-08 12:01:52 +00:00
Kiskae
8fb27bbdae linuxPackages.nvidia_x11_vulkan_beta: 535.43.10 -> 535.43.11 2023-10-07 15:03:18 +02:00
Maximilian Bosch
8bc5104a6e
treewide: refactor .attrs.sh detection
When specifying the `builder` attribute in `stdenv.mkDerivation`, this
will be effectively transformed into

    builtins.derivation {
      builder = stdenv.shell;
      args = [ "-e" builder ];
    }

This also means that `default-builder.sh` is never sourced and as a
result it's not guaranteed that `$NIX_ATTRS_SH_FILE` is set to a correct
location[1].

Also, we need to source `.attrs.sh` to source `$stdenv`. So, the
following is done now:

* If `$NIX_ATTRS_SH_FILE` points to a correct location, then use it.
  Directly using `.attrs.sh` is problematic for `nix-shell(1)` usage
  (see previous commit for more context), so prefer the environment
  variable if possible.

* Otherwise, if `.attrs.sh` exists, then use it. See [1] for when this
  can happen.

* If neither applies, it can be assumed that `__structuredAttrs` is
  turned off and thus nothing needs to be done.

[1] It's possible that it doesn't exist at all - in case of Nix 2.3 or
    it can point to a wrong location on older Nix versions with a bug in
    `__structuredAttrs`.
2023-10-04 18:36:57 +02:00
Kiskae
9181016170 linuxPackages.nvidia_x11_vulkan_beta: 535.43.09 -> 535.43.10 2023-09-28 20:46:35 +02:00
Nick Cao
74856dd845
Merge pull request #256551 from Kiskae/nvidia/535.113.01
linuxPackages.nvidiaPackages.production: 535.104.05 -> 535.113.01
2023-09-21 17:18:12 -04:00
musjj
d62f7fef9f
linuxPackages.nvidia_x11_legacy470: fix hash 2023-09-22 01:27:54 +07:00
Kiskae
e2b919039a linuxPackages.nvidiaPackages.production: 535.104.05 -> 535.113.01 2023-09-21 20:05:46 +02:00
Kiskae
67bf9e4e99 linuxPackages.nvidia_x11_legacy470: kernel 6.6 support 2023-09-17 22:35:09 +02:00
Kiskae
762ad8efb4 linuxPackages.nvidia_x11_legacy340: fix up to kernel 6.6 2023-09-17 22:33:36 +02:00
Edward Tjörnhammar
9b95f21cdb nvidia,nixos/nvidia: add datacenter drivers compatible with default cudaPkgs
For NVLink topology systems we need fabricmanager. Fabricmanager itself is
dependent on the datacenter driver set and not the regular x11 ones, it is also
tightly tied to the driver version. Furhtermore the current cudaPackages
defaults to version 11.8, which corresponds to the 520 datacenter drivers.

Future improvement should be to switch the main nvidia datacenter driver version
on the `config.cudaVersion` since these are well known from:

> https://docs.nvidia.com/deploy/cuda-compatibility/index.html#use-the-right-compat-package

This adds nixos configuration options `hardware.nvidia.datacenter.enable` and
`hardware.nvidia.datacenter.settings` (the settings configure fabricmanager)

Other interesting external links related to this commit are:

* Fabricmanager download site:
    - https://developer.download.nvidia.com/compute/cuda/redist/fabricmanager/linux-x86_64/
* Data Center drivers:
    - https://www.nvidia.com/Download/driverResults.aspx/193711/en-us/

Implementation specific details:

* Fabricmanager is added as a passthru package, similar to settings and
  presistenced.
* Adds `use{Settings,Persistenced,Fabricmanager}` with defaults to preserve x11
  expressions.
* Utilizes mkMerge to split the `hardware.nvidia` module into three comment
  delimited sections:
    1. Common
    2. X11/xorg
    3. Data Center
* Uses asserts to make the configurations mutualy exclusive.

Notes:

* Data Center Drivers are `x86_64` only.
* Reuses the `nvidia_x11` attribute in nixpkgs on enable, e.g. doesn't change it
  to `nvidia_driver` and sets that to either `nvidia_x11` or `nvidia_dc`.
* Should have a helper function which is switched on `config.cudaVersion` like
  `selectHighestVersion` but rather `selectCudaCompatibleVersion`.
2023-09-12 07:17:33 +02:00
Kiskae
7f6a9fcfc4 linuxPackages.nvidia_x11_vulkan_beta: 535.43.08 -> 535.43.09 2023-09-02 16:27:21 +02:00
Nick Cao
d75758279f
linuxPackages.nvidiaPackages.production: 535.98 -> 535.104.05
Release note: https://www.nvidia.com/download/driverResults.aspx/210649/en-us/
2023-08-26 14:08:13 +08:00
Anselm Schüler
9da128a8b3 nvidia-persistenced: set mainProgram 2023-08-20 11:00:43 +02:00
Kiskae
5a96e2dc17 linuxPackages.nvidia_x11_vulkan_beta: 525.47.35 -> 535.43.08 2023-08-18 09:32:25 +02:00
Nick Cao
467e4c2e93
Merge pull request #249158 from Kiskae/nvidia-settings/fix-path
linuxPackages.nvidia_x11.settings: fix runpath
2023-08-14 18:43:48 -06:00
Kiskae
2249c1e5dc linuxPackage.nvidia_x11.settings: nixpkgs-fmt and add opengl runpath 2023-08-14 19:00:07 +02:00
Kiskae
877980c410 linuxPackage.nvidia_x11*: Remove another nvidia-settings library 2023-08-14 18:40:50 +02:00
Lin Jian
6d2b127349
linuxPackages.nvidia_x11.settings: add mainProgram 2023-08-13 22:52:23 +08:00
Nick Cao
0991f1b7d7
Merge pull request #248128 from Kiskae/nvidia-settings-fix
linuxPackages.nvidia_x11.settings: fix wayland support
2023-08-13 00:09:15 -06:00
Franz Pletz
9c85697da8
Merge pull request #244060 from Gerg-L/nvidiaDynamicBoost
nixos/nvidia: clean up and add dynamic boost
2023-08-10 17:02:26 +02:00
Kiskae
9adbc6eca4 linuxPackages.nvidia_x11.settings: fix wayland support 2023-08-09 13:33:19 +02:00
Kiskae
72b87054dd
linuxPackages.nvidia_x11_production: 535.86.05-> 535.98 2023-08-08 21:19:52 +02:00
Gerg-L
4ca2a16390 nixos/nvidia: add Dynamic Boost support 2023-08-03 09:32:14 -04:00
Kiskae
19a2f8dfb8 linuxPackages.nvidia_x11_vulkan_beta: 525.47.34 -> 525.47.35 2023-07-28 23:08:20 +02:00
Kiskae
5f5090b3f1 linuxPackages.nvidia_x11_vulkan_beta: 525.47.31 -> 525.47.34 2023-07-24 20:44:06 +02:00
Nick Cao
e9eec44d58
Merge pull request #240075 from Kiskae/patch-1
linuxPackages.nvidiaPackages.mkDriver: init
2023-07-19 19:06:21 -06:00
Nick Cao
37c6252cd1
Merge pull request #244170 from Kiskae/nvidia/470.199.02
linuxPackages.nvidia_x11_legacy470: 470.182.03 -> 470.199.02
2023-07-18 16:48:38 -06:00
Kiskae
ac9115761e linuxPackages.nvidia_x11_production: 535.54.03 -> 535.86.05 2023-07-18 20:31:31 +02:00
Kiskae
062d053148 linuxPackages.nvidia_x11_legacy470: 470.182.03 -> 470.199.02
Also add tentative patch for linux 6.5
2023-07-18 16:42:13 +02:00
Kiskae
704a02e155 linuxPackages.nvidia_x11_vulkan_beta: 525.47.27 -> 525.47.31 2023-07-11 21:05:50 +02:00
Kiskae
8ef3c5b70e
linuxPackages.nvidiaPackages.mkDriver: init 2023-06-27 10:24:50 +02:00
Nick Cao
048c23915b
Merge pull request #237961 from Kiskae/nvidia/525.47.27
linuxPackages.nvidia_x11_vulkan_beta: 525.47.26 -> 525.47.27
2023-06-15 19:53:34 -06:00
Kiskae
b497970a8e linuxPackages.nvidia_x11_vulkan_beta: 525.47.26 -> 525.47.27 2023-06-15 20:33:04 +02:00
Kiskae
b518881d73
linuxPackages.nvidia_x11_production: 525.116.04 -> 535.54.03 2023-06-14 22:05:12 +02:00
Kiskae
c79b173db5 linuxPackages.nvidia_x11_beta: fix optix denoiser
OptiX tries loading `$ORIGIN/nvoptix.bin` before
`/usr/share/nvidia/nvoptix.bin`.

Additionally OptiX isn't supported for 32-bit.
2023-06-05 19:49:17 +02:00
Kiskae
99b7ee661b linuxPackages.nvidia_x11_beta: install nvoptix.bin 2023-05-30 20:22:39 +02:00
Kiskae
10d634b384 linuxPackages.nvidia_x11_beta: add new dependency
new `libnvidia-pkcs11*` libraries depend on openssl, used by cuda
2023-05-30 20:14:57 +02:00
Kiskae
e111d64bdf linuxPackages.nvidia_x11_beta: 530.41.03 -> 535.43.02 2023-05-30 19:42:18 +02:00
Kiskae
6728806fe8
linuxPackages.nvidia_x11_vulkan_beta: 525.47.24 -> 525.47.26 2023-05-20 11:49:13 +02:00
Kiskae
7974082b58 linuxPackages.nvidia_x11_vulkan_beta: 525.47.22 -> 525.47.24
Also update settings/persistenced to latest production version.
2023-05-16 22:30:24 +02:00
Kiskae
89f389dd94 nvidia_x11: replace pre/postPatch with patchFlags 2023-05-13 20:16:00 +02:00
Kiskae
0b14e79f1c linuxPackages.nvidia_x11_legacy390: mark broken on linux 6.2 2023-05-13 16:59:41 +02:00
Kiskae
af114e543f linuxPackages.nvidia_x11_legacy370: fix up to kernel 6.3 2023-05-13 16:43:06 +02:00
Kiskae
f6ad55ab2f linuxPackages.nvidia_x11: kernel 6.4 support 2023-05-13 16:41:37 +02:00
Kiskae
101f4b5afd linuxPackages.nvidia_x11_legacy470: kernel 6.4 support 2023-05-13 16:41:20 +02:00
Kiskae
1e1b8c5a8d linuxPackages.nvidia_x11_production: 525.116.03 -> 525.116.04 2023-05-09 21:19:16 +02:00
Kiskae
fd48d7c336 linuxPackages.nvidia_x11_vulkan_beta: 525.47.18 -> 525.47.22 2023-04-28 00:00:16 +02:00
Nick Cao
21c7a6c42a
Merge pull request #228199 from Kiskae/patch-1
linuxPackages.nvidia_x11_production: 525.105.17 -> 525.116.03
2023-04-26 19:27:21 +08:00
Kiskae
3f8fc9c28b linuxPackages.nvidia_x11_legacy470: 470.161.03 -> 470.182.03 2023-04-26 00:51:46 +02:00
Kiskae
144e1ae7d5 linuxPackages.nvidia_x11_production: 525.105.17 -> 525.116.03 2023-04-25 23:17:41 +02:00
Mika Tammi
2a6b15d371
linuxPackages.nvidia_x11: aarch64-linux support
* Add aarch64-linux binary packages
* add cross-compilation support to open-package

Signed-off-by: Mika Tammi <mika.tammi@unikie.com>
2023-04-14 17:36:16 +03:00
Kiskae
4f8300ad9a linuxPackages.nvidia_x11: add kiskae as maintainer 2023-04-14 12:45:19 +02:00
Thiago Kenji Okada
dff3892008
Merge pull request #220708 from Kiskae/patch-5
linuxPackages.nvidia_x11_vulkan_beta: 525.47.11 -> 525.47.18
2023-04-11 15:18:30 +01:00
Kiskae
ea126529eb nixos/nvidia: allow package to override IBT support 2023-04-01 14:44:43 +02:00
Kiskae
1b911d1fe2 linuxPackages.nvidia_x11_production: 525.89.02 -> 525.105.17 2023-04-01 13:38:30 +02:00
Kiskae
7c0d0c1aaa linuxPackages.nvidia_x11_vulkan_beta: 525.47.11 -> 525.47.18 2023-03-31 18:20:09 +02:00
Nick Cao
ca7c52c4f5
Merge pull request #222762 from Kiskae/nvidia/530.41.03
linuxPackages.nvidia_x11: 525.89.02 -> 530.41.03
2023-03-28 08:23:48 +08:00
Zhaofeng Li
7159363f51
linuxPackages.nvidia_x11_legacy340: Fix build on 6.1
This uses the patchset of a popular AUR package.
2023-03-27 18:53:00 +02:00
Kiskae
90c44c9598 linuxPackages.nvidia_x11: 525.89.02 -> 530.41.03 2023-03-24 11:39:03 +01:00
Kiskae
070c3a155f linuxPackages.nvidia_x11_beta: 525.89.02 -> 530.30.02 2023-03-24 11:38:42 +01:00
Kiskae
91f99f14ff linuxPackages.nvidia_x11: add support for zstd compression 2023-03-24 11:35:55 +01:00
superherointj
2006fd9410
Merge pull request #220003 from Kiskae/nvidia-470-6.2-fix
linuxPackages_6_2.nvidia_x11_legacy470: add patch
2023-03-14 17:56:36 -03:00
Kiskae
1e33804975 linuxPackages_6_2.nvidia_x11_legacy470: add patch
fixes #219907
2023-03-14 21:08:05 +01:00
Kiskae
3a6f8a5871
linuxPackages.nvidia_x11_vulkan_beta: 515.47.06 -> 525.47.11 2023-02-27 22:40:02 +01:00
superherointj
371c7b8239
Merge pull request #217718 from Kiskae/nvidia/unbreak-6.2
linuxPackages_6_2.nvidia_x11: disable ibt
2023-02-24 17:46:26 -03:00
Artturin
f9fdf2d402 treewide: move NIX_CFLAGS_COMPILE to the env attrset
with structuredAttrs lists will be bash arrays which cannot be exported
which will be a issue with some patches and some wrappers like cc-wrapper

this makes it clearer that NIX_CFLAGS_COMPILE must be a string as lists
in env cause a eval failure
2023-02-22 21:23:04 +02:00