···34On NixOS, it can be installed using the following expression:
3536```nix
37-{ pkgs, ... }: { fonts.fonts = with pkgs; [ noto-fonts-emoji ]; }
0038```
···34On NixOS, it can be installed using the following expression:
3536```nix
37+{ pkgs, ... }: {
38+ fonts.packages = with pkgs; [ noto-fonts-emoji ];
39+}
40```
+5-2
doc/languages-frameworks/cuda.section.md
···1213To use one or more CUDA packages in an expression, give the expression a `cudaPackages` parameter, and in case CUDA is optional
14```nix
15-cudaSupport ? false
16-cudaPackages ? {}
00017```
1819When using `callPackage`, you can choose to pass in a different variant, e.g.
···1213To use one or more CUDA packages in an expression, give the expression a `cudaPackages` parameter, and in case CUDA is optional
14```nix
15+{ config
16+, cudaSupport ? config.cudaSupport
17+, cudaPackages ? { }
18+, ...
19+}:
20```
2122When using `callPackage`, you can choose to pass in a different variant, e.g.
+3-2
lib/generators.nix
···81 */
82 toKeyValue = {
83 mkKeyValue ? mkKeyValueDefault {} "=",
84- listsAsDuplicateKeys ? false
085 }:
86- let mkLine = k: v: mkKeyValue k v + "\n";
87 mkLines = if listsAsDuplicateKeys
88 then k: v: map (mkLine k) (if lib.isList v then v else [v])
89 else k: v: [ (mkLine k v) ];
···81 */
82 toKeyValue = {
83 mkKeyValue ? mkKeyValueDefault {} "=",
84+ listsAsDuplicateKeys ? false,
85+ indent ? ""
86 }:
87+ let mkLine = k: v: indent + mkKeyValue k v + "\n";
88 mkLines = if listsAsDuplicateKeys
89 then k: v: map (mkLine k) (if lib.isList v then v else [v])
90 else k: v: [ (mkLine k v) ];
···8384- [gitea-actions-runner](https://gitea.com/gitea/act_runner), a CI runner for Gitea/Forgejo Actions. Available as [services.gitea-actions-runner](#opt-services.gitea-actions-runner.instances).
850086- [gmediarender](https://github.com/hzeller/gmrender-resurrect), a simple, headless UPnP/DLNA renderer. Available as [services.gmediarender](options.html#opt-services.gmediarender.enable).
8788- [go2rtc](https://github.com/AlexxIT/go2rtc), a camera streaming appliation with support for RTSP, WebRTC, HomeKit, FFMPEG, RTMP and other protocols. Available as [services.go2rtc](options.html#opt-services.go2rtc.enable).
···8384- [gitea-actions-runner](https://gitea.com/gitea/act_runner), a CI runner for Gitea/Forgejo Actions. Available as [services.gitea-actions-runner](#opt-services.gitea-actions-runner.instances).
8586+- [evdevremapkeys](https://github.com/philipl/evdevremapkeys), a daemon to remap key events. Available as [services.evdevremapkeys](#opt-services.evdevremapkeys.enable).
87+88- [gmediarender](https://github.com/hzeller/gmrender-resurrect), a simple, headless UPnP/DLNA renderer. Available as [services.gmediarender](options.html#opt-services.gmediarender.enable).
8990- [go2rtc](https://github.com/AlexxIT/go2rtc), a camera streaming appliation with support for RTSP, WebRTC, HomeKit, FFMPEG, RTMP and other protocols. Available as [services.go2rtc](options.html#opt-services.go2rtc.enable).
+2
nixos/doc/manual/release-notes/rl-2311.section.md
···123124- `buildGoModule` `go-modules` attrs have been renamed to `goModules`.
12500126- `services.fail2ban.jails` can now be configured with attribute sets defining settings and filters instead of lines. The stringed options `daemonConfig` and `extraSettings` have respectively been replaced by `daemonSettings` and `jails.DEFAULT.settings` which use attribute sets.
127128- The module [services.ankisyncd](#opt-services.ankisyncd.package) has been switched to [anki-sync-server-rs](https://github.com/ankicommunity/anki-sync-server-rs) from the old python version, which was difficult to update, had not been updated in a while, and did not support recent versions of anki.
···123124- `buildGoModule` `go-modules` attrs have been renamed to `goModules`.
125126+- The `fonts.fonts` and `fonts.enableDefaultFonts` options have been renamed to `fonts.packages` and `fonts.enableDefaultPackages` respectively.
127+128- `services.fail2ban.jails` can now be configured with attribute sets defining settings and filters instead of lines. The stringed options `daemonConfig` and `extraSettings` have respectively been replaced by `daemonSettings` and `jails.DEFAULT.settings` which use attribute sets.
129130- The module [services.ankisyncd](#opt-services.ankisyncd.package) has been switched to [anki-sync-server-rs](https://github.com/ankicommunity/anki-sync-server-rs) from the old python version, which was difficult to update, had not been updated in a while, and did not support recent versions of anki.
···3with lib;
45{
6-7 options = {
8-9- fonts = {
10-11- enableGhostscriptFonts = mkOption {
12- type = types.bool;
13- default = false;
14- description = lib.mdDoc ''
15- Whether to add the fonts provided by Ghostscript (such as
16- various URW fonts and the “Base-14” Postscript fonts) to the
17- list of system fonts, making them available to X11
18- applications.
19- '';
20- };
21-22 };
2324 };
2526-27 config = mkIf config.fonts.enableGhostscriptFonts {
28-29- fonts.fonts = [ "${pkgs.ghostscript}/share/ghostscript/fonts" ];
30-31 };
32-33}
···3with lib;
45{
06 options = {
7+ fonts.enableGhostscriptFonts = mkOption {
8+ type = types.bool;
9+ default = false;
10+ description = lib.mdDoc ''
11+ Whether to add the fonts provided by Ghostscript (such as
12+ various URW fonts and the “Base-14” Postscript fonts) to the
13+ list of system fonts, making them available to X11
14+ applications.
15+ '';
0000016 };
1718 };
19020 config = mkIf config.fonts.enableGhostscriptFonts {
21+ fonts.packages = [ "${pkgs.ghostscript}/share/ghostscript/fonts" ];
0022 };
023}
···3 configuration to work.
45 See also
6- - ./nix.nix
7- - ./nix-flakes.nix
8 */
9{ config, lib, ... }:
10let
···28 Whether the `nix-channel` command and state files are made available on the machine.
2930 The following files are initialized when enabled:
31- - `/nix/var/nix/profiles/per-user/root/channels`
32- - `/root/.nix-channels`
33- - `$HOME/.nix-defexpr/channels` (on login)
3435 Disabling this option will not remove the state files from the system.
36 '';
···48 "nixos-config=/etc/nixos/configuration.nix"
49 "/nix/var/nix/profiles/per-user/root/channels"
50 ]
51- else [];
52 defaultText = ''
53 if nix.channel.enable
54 then [
···86 '';
8788 environment.extraSetup = mkIf (!cfg.channel.enable) ''
89- rm $out/bin/nix-channel
90 '';
9192 # NIX_PATH has a non-empty default according to Nix docs, so we don't unset
···3 configuration to work.
45 See also
6+ - ./nix.nix
7+ - ./nix-flakes.nix
8 */
9{ config, lib, ... }:
10let
···28 Whether the `nix-channel` command and state files are made available on the machine.
2930 The following files are initialized when enabled:
31+ - `/nix/var/nix/profiles/per-user/root/channels`
32+ - `/root/.nix-channels`
33+ - `$HOME/.nix-defexpr/channels` (on login)
3435 Disabling this option will not remove the state files from the system.
36 '';
···48 "nixos-config=/etc/nixos/configuration.nix"
49 "/nix/var/nix/profiles/per-user/root/channels"
50 ]
51+ else [ ];
52 defaultText = ''
53 if nix.channel.enable
54 then [
···86 '';
8788 environment.extraSetup = mkIf (!cfg.channel.enable) ''
89+ rm --force $out/bin/nix-channel
90 '';
9192 # NIX_PATH has a non-empty default according to Nix docs, so we don't unset
···26 lib.mapAttrs (_: toString) cfg.extraConfig
27 );
2829+ manage = pkgs.writeShellScript "manage" ''
30+ set -o allexport # Export the following env vars
31+ ${lib.toShellVars env}
32+ exec ${pkg}/bin/paperless-ngx "$@"
33+ '';
0003435 # Secure the services
36 defaultServiceConfig = {
···169 description = lib.mdDoc "Web interface port.";
170 };
171172+ # FIXME this should become an RFC42-style settings attr
173 extraConfig = mkOption {
174 type = types.attrs;
175 default = { };
···178179 See [the documentation](https://paperless-ngx.readthedocs.io/en/latest/configuration.html)
180 for available options.
181+182+ Note that some options such as `PAPERLESS_CONSUMER_IGNORE_PATTERN` expect JSON values. Use `builtins.toJSON` to ensure proper quoting.
183 '';
184+ example = literalExpression ''
185+ {
186+ PAPERLESS_OCR_LANGUAGE = "deu+eng";
187+188+ PAPERLESS_DBHOST = "/run/postgresql";
189+190+ PAPERLESS_CONSUMER_IGNORE_PATTERN = builtins.toJSON [ ".DS_STORE/*" "desktop.ini" ];
191+192+ PAPERLESS_OCR_USER_ARGS = builtins.toJSON {
193+ optimize = 1;
194+ pdfa_image_compression = "lossless";
195+ };
196+ };
197+ '';
198 };
199200 user = mkOption {
+1-1
nixos/modules/services/monitoring/munin.nix
···375376 # Munin is hardcoded to use DejaVu Mono and the graphs come out wrong if
377 # it's not available.
378- fonts.fonts = [ pkgs.dejavu_fonts ];
379380 systemd.timers.munin-cron = {
381 description = "batch Munin master programs";
···375376 # Munin is hardcoded to use DejaVu Mono and the graphs come out wrong if
377 # it's not available.
378+ fonts.packages = [ pkgs.dejavu_fonts ];
379380 systemd.timers.munin-cron = {
381 description = "batch Munin master programs";
···1+From 982d38084f08950863b55043f36ce5548bd73635 Mon Sep 17 00:00:00 2001
2+From: Maximilian Bosch <maximilian@mbosch.me>
3+Date: Mon, 24 Jul 2023 19:12:25 +0200
4+Subject: [PATCH] Strip away BUILDCONFIG
5+6+The `BuildConfig` field in `libsofficeapp.so` includes the entire
7+`PKG_CONFIG_PATH` and subsequently references to a lot of `dev` outputs
8+of library dependencies blowing up the closure.
9+10+Since this is not strictly needed and the inputs are comprehensible via
11+`nix derivation show`, this doesn't bring a real benefit in the case of
12+nixpkgs anyways.
13+---
14+ desktop/source/lib/init.cxx | 2 +-
15+ 1 file changed, 1 insertion(+), 1 deletion(-)
16+17+diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
18+index 8d830c0cbd00..fbdc86aa7115 100644
19+--- a/desktop/source/lib/init.cxx
20++++ b/desktop/source/lib/init.cxx
21+@@ -7097,7 +7097,7 @@ static char* lo_getVersionInfo(SAL_UNUSED_PARAMETER LibreOfficeKit* /*pThis*/)
22+ "\"ProductVersion\": \"%PRODUCTVERSION\", "
23+ "\"ProductExtension\": \"%PRODUCTEXTENSION\", "
24+ "\"BuildId\": \"%BUILDID\", "
25+- "\"BuildConfig\": \"" BUILDCONFIG "\" "
26++ "\"BuildConfig\": \"removed to avoid runtime dependencies against dev outputs of each dependency. Use 'nix derivation show' against the package to find out details about BuildConfig.\" "
27+ "}"));
28+ }
29+30+--
31+2.40.1
32+
+16
pkgs/applications/office/libreoffice/default.nix
···214 tar -xf ${srcs.translations}
215 '';
2160000000000000000217 ### QT/KDE
218 #
219 # configure.ac assumes that the first directory that contains headers and
···214 tar -xf ${srcs.translations}
215 '';
216217+ # Remove build config to reduce the amount of `-dev` outputs in the
218+ # runtime closure. This was introduced in upstream commit
219+ # cbfac11330882c7d0a817b6c37a08b2ace2b66f4, so the patch doesn't apply
220+ # for 7.4.
221+ patches = lib.optionals (lib.versionAtLeast version "7.5") [
222+ ./0001-Strip-away-BUILDCONFIG.patch
223+ ];
224+225+ # libreoffice tries to reference the BUILDCONFIG (e.g. PKG_CONFIG_PATH)
226+ # in the binary causing the closure size to blow up because of many unnecessary
227+ # dependencies to dev outputs. This behavior was patched away in nixpkgs
228+ # (see above), make sure these don't leak again by accident.
229+ disallowedRequisites = lib.concatMap
230+ (x: lib.optional (x?dev) x.dev)
231+ buildInputs;
232+233 ### QT/KDE
234 #
235 # configure.ac assumes that the first directory that contains headers and
+4-1
pkgs/applications/radio/ax25-tools/default.nix
···17 sha256 = "sha256-kqnLi1iobcufVWMPxUyaRsWKIPyTvtUkuMERGQs2qgY=";
18 };
1920- configureFlags = [ "--sysconfdir=/etc" ];
0002122 meta = with lib; {
23 description = "Non-GUI tools used to configure an AX.25 enabled computer";
···17 sha256 = "sha256-kqnLi1iobcufVWMPxUyaRsWKIPyTvtUkuMERGQs2qgY=";
18 };
1920+ configureFlags = [
21+ "--sysconfdir=/etc"
22+ "--localstatedir=/var/lib"
23+ ];
2425 meta = with lib; {
26 description = "Non-GUI tools used to configure an AX.25 enabled computer";
+1-1
pkgs/applications/radio/urh/default.nix
···33 homepage = "https://github.com/jopohl/urh";
34 description = "Universal Radio Hacker: investigate wireless protocols like a boss";
35 license = licenses.gpl3;
36- platforms = platforms.linux;
37 maintainers = with maintainers; [ fpletz ];
38 };
39}
···33 homepage = "https://github.com/jopohl/urh";
34 description = "Universal Radio Hacker: investigate wireless protocols like a boss";
35 license = licenses.gpl3;
36+ platforms = platforms.unix;
37 maintainers = with maintainers; [ fpletz ];
38 };
39}
···1diff --git a/pkg/machine/qemu/machine.go b/pkg/machine/qemu/machine.go
2-index 4f25b4d26..8a79862fd 100644
3--- a/pkg/machine/qemu/machine.go
4+++ b/pkg/machine/qemu/machine.go
5-@@ -1509,11 +1509,6 @@ func (v *MachineVM) waitAPIAndPrintInfo(forwardState apiForwardingState, forward
6- case notInstalled:
7 fmt.Printf("\nThe system helper service is not installed; the default Docker API socket\n")
8 fmt.Printf("address can't be used by podman. ")
9- if helper := findClaimHelper(); len(helper) > 0 {
···11- fmt.Printf("\n\tsudo %s install\n", helper)
12- fmt.Printf("\tpodman machine stop%s; podman machine start%s\n\n", suffix, suffix)
13- }
14- case machineLocal:
15 fmt.Printf("\nAnother process was listening on the default Docker API socket address.\n")
16- case claimUnsupported:
···1diff --git a/pkg/machine/qemu/machine.go b/pkg/machine/qemu/machine.go
2+index a118285f7..d775f0099 100644
3--- a/pkg/machine/qemu/machine.go
4+++ b/pkg/machine/qemu/machine.go
5+@@ -1560,11 +1560,6 @@ func (v *MachineVM) waitAPIAndPrintInfo(forwardState machine.APIForwardingState,
6+ case machine.NotInstalled:
7 fmt.Printf("\nThe system helper service is not installed; the default Docker API socket\n")
8 fmt.Printf("address can't be used by podman. ")
9- if helper := findClaimHelper(); len(helper) > 0 {
···11- fmt.Printf("\n\tsudo %s install\n", helper)
12- fmt.Printf("\tpodman machine stop%s; podman machine start%s\n\n", suffix, suffix)
13- }
14+ case machine.MachineLocal:
15 fmt.Printf("\nAnother process was listening on the default Docker API socket address.\n")
16+ case machine.ClaimUnsupported:
···24, libkrb5
25, krb5
26, makeWrapper
027, ncurses5
28, numactl
29, nss
···31, python3 # FIXME: CUDAToolkit 10 may still need python27
32, pulseaudio
33, requireFile
034, stdenv
35, backendStdenv # E.g. gcc11Stdenv, set in extension.nix
36, unixODBC
···80 addOpenGLRunpath
81 autoPatchelfHook
82 autoAddOpenGLRunpathHook
083 ] ++ lib.optionals (lib.versionOlder version "11") [
84 libsForQt5.wrapQtAppsHook
85 ] ++ lib.optionals (lib.versionAtLeast version "11.8") [
86 qt6Packages.wrapQtAppsHook
87 ];
00088 buildInputs = lib.optionals (lib.versionOlder version "11") [
89 libsForQt5.qt5.qtwebengine
90 freeglut
···129 (lib.getLib libtiff)
130 qt6Packages.qtwayland
131 rdma-core
132- ucx
133 xorg.libxshmfence
134 xorg.libxkbfile
135 ] ++ (lib.optionals (lib.versionAtLeast version "12.1") (map lib.getLib ([
···280 sed -i "1 i#define _BITS_FLOATN_H" "$out/include/host_defines.h"
281 '' +
282 # Point NVCC at a compatible compiler
283- # FIXME: redist cuda_nvcc copy-pastes this code
284- # Refer to comments in the overrides for cuda_nvcc for explanation
285 # CUDA_TOOLKIT_ROOT_DIR is legacy,
286 # Cf. https://cmake.org/cmake/help/latest/module/FindCUDA.html#input-variables
287- # NOTE: We unconditionally set -Xfatbin=-compress-all, which reduces the size of the compiled
288- # binaries. If binaries grow over 2GB, they will fail to link. This is a problem for us, as
289- # the default set of CUDA capabilities we build can regularly cause this to occur (for
290- # example, with Magma).
291 ''
292 mkdir -p $out/nix-support
293 cat <<EOF >> $out/nix-support/setup-hook
294 cmakeFlags+=' -DCUDA_TOOLKIT_ROOT_DIR=$out'
295- cmakeFlags+=' -DCUDA_HOST_COMPILER=${backendStdenv.cc}/bin'
296- cmakeFlags+=' -DCMAKE_CUDA_HOST_COMPILER=${backendStdenv.cc}/bin'
297- if [ -z "\''${CUDAHOSTCXX-}" ]; then
298- export CUDAHOSTCXX=${backendStdenv.cc}/bin;
299- fi
300- export NVCC_PREPEND_FLAGS+=' --compiler-bindir=${backendStdenv.cc}/bin -Xfatbin=-compress-all'
301 EOF
302303 # Move some libraries to the lib output so that programs that
···24, libkrb5
25, krb5
26, makeWrapper
27+, markForCudatoolkitRootHook
28, ncurses5
29, numactl
30, nss
···32, python3 # FIXME: CUDAToolkit 10 may still need python27
33, pulseaudio
34, requireFile
35+, setupCudaHook
36, stdenv
37, backendStdenv # E.g. gcc11Stdenv, set in extension.nix
38, unixODBC
···82 addOpenGLRunpath
83 autoPatchelfHook
84 autoAddOpenGLRunpathHook
85+ markForCudatoolkitRootHook
86 ] ++ lib.optionals (lib.versionOlder version "11") [
87 libsForQt5.wrapQtAppsHook
88 ] ++ lib.optionals (lib.versionAtLeast version "11.8") [
89 qt6Packages.wrapQtAppsHook
90 ];
91+ depsTargetTargetPropagated = [
92+ setupCudaHook
93+ ];
94 buildInputs = lib.optionals (lib.versionOlder version "11") [
95 libsForQt5.qt5.qtwebengine
96 freeglut
···135 (lib.getLib libtiff)
136 qt6Packages.qtwayland
137 rdma-core
138+ (ucx.override { enableCuda = false; }) # Avoid infinite recursion
139 xorg.libxshmfence
140 xorg.libxkbfile
141 ] ++ (lib.optionals (lib.versionAtLeast version "12.1") (map lib.getLib ([
···286 sed -i "1 i#define _BITS_FLOATN_H" "$out/include/host_defines.h"
287 '' +
288 # Point NVCC at a compatible compiler
00289 # CUDA_TOOLKIT_ROOT_DIR is legacy,
290 # Cf. https://cmake.org/cmake/help/latest/module/FindCUDA.html#input-variables
0000291 ''
292 mkdir -p $out/nix-support
293 cat <<EOF >> $out/nix-support/setup-hook
294 cmakeFlags+=' -DCUDA_TOOLKIT_ROOT_DIR=$out'
000000295 EOF
296297 # Move some libraries to the lib output so that programs that
···1+# shellcheck shell=bash
2+3+# CMake's enable_language(CUDA) runs a compiler test and it doesn't account for
4+# CUDAToolkit_ROOT. We have to help it locate libcudart
5+export NVCC_APPEND_FLAGS+=" -L@cudartRoot@/lib -I@cudartRoot@/include"
···1+# shellcheck shell=bash
2+3+echo Sourcing setup-cuda-hook >&2
4+5+extendCUDAToolkit_ROOT() {
6+ if [[ -f "$1/nix-support/include-in-cudatoolkit-root" ]] ; then
7+ addToSearchPathWithCustomDelimiter ";" CUDAToolkit_ROOT "$1"
8+9+ if [[ -d "$1/include" ]] ; then
10+ addToSearchPathWithCustomDelimiter ";" CUDAToolkit_INCLUDE_DIR "$1/include"
11+ fi
12+ fi
13+}
14+15+addEnvHooks "$targetOffset" extendCUDAToolkit_ROOT
16+17+setupCUDAToolkitCompilers() {
18+ echo Executing setupCUDAToolkitCompilers >&2
19+20+ if [[ -n "${dontSetupCUDAToolkitCompilers-}" ]] ; then
21+ return
22+ fi
23+24+ # Point NVCC at a compatible compiler
25+26+ # For CMake-based projects:
27+ # https://cmake.org/cmake/help/latest/module/FindCUDA.html#input-variables
28+ # https://cmake.org/cmake/help/latest/envvar/CUDAHOSTCXX.html
29+ # https://cmake.org/cmake/help/latest/variable/CMAKE_CUDA_HOST_COMPILER.html
30+31+ export cmakeFlags+=" -DCUDA_HOST_COMPILER=@ccFullPath@"
32+ export cmakeFlags+=" -DCMAKE_CUDA_HOST_COMPILER=@ccFullPath@"
33+34+ # For non-CMake projects:
35+ # We prepend --compiler-bindir to nvcc flags.
36+ # Downstream packages can override these, because NVCC
37+ # uses the last --compiler-bindir it gets on the command line.
38+ # FIXME: this results in "incompatible redefinition" warnings.
39+ # https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html#compiler-bindir-directory-ccbin
40+ if [ -z "${CUDAHOSTCXX-}" ]; then
41+ export CUDAHOSTCXX="@ccFullPath@";
42+ fi
43+44+ export NVCC_PREPEND_FLAGS+=" --compiler-bindir=@ccRoot@/bin"
45+46+ # NOTE: We set -Xfatbin=-compress-all, which reduces the size of the compiled
47+ # binaries. If binaries grow over 2GB, they will fail to link. This is a problem for us, as
48+ # the default set of CUDA capabilities we build can regularly cause this to occur (for
49+ # example, with Magma).
50+ #
51+ # @SomeoneSerge: original comment was made by @ConnorBaker in .../cudatoolkit/common.nix
52+ if [[ -z "${dontCompressFatbin-}" ]]; then
53+ export NVCC_PREPEND_FLAGS+=" -Xfatbin=-compress-all"
54+ fi
55+56+ # CMake's enable_language(CUDA) runs a compiler test and it doesn't account for
57+ # CUDAToolkit_ROOT. We have to help it locate libcudart
58+ if [[ -z "${nvccDontPrependCudartFlags-}" ]] ; then
59+ export NVCC_APPEND_FLAGS+=" -L@cudartRoot@/lib -I@cudartRoot@/include"
60+ fi
61+}
62+63+setupCMakeCUDAToolkit_ROOT() {
64+ export cmakeFlags+=" -DCUDAToolkit_INCLUDE_DIR=$CUDAToolkit_INCLUDE_DIR -DCUDAToolkit_ROOT=$CUDAToolkit_ROOT"
65+}
66+67+postHooks+=(setupCUDAToolkitCompilers)
68+preConfigureHooks+=(setupCMakeCUDAToolkit_ROOT)
···27 inherit (prev.backendStdenv) cc;
28 in
29 {
30- # Point NVCC at a compatible compiler
31- # FIXME: non-redist cudatoolkit copy-pastes this code
003233- # For CMake-based projects:
34- # https://cmake.org/cmake/help/latest/module/FindCUDA.html#input-variables
35- # https://cmake.org/cmake/help/latest/envvar/CUDAHOSTCXX.html
36- # https://cmake.org/cmake/help/latest/variable/CMAKE_CUDA_HOST_COMPILER.html
3738- # For non-CMake projects:
39- # We prepend --compiler-bindir to nvcc flags.
40- # Downstream packages can override these, because NVCC
41- # uses the last --compiler-bindir it gets on the command line.
42- # FIXME: this results in "incompatible redefinition" warnings.
43- # https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html#compiler-bindir-directory-ccbin
44- # NOTE: We unconditionally set -Xfatbin=-compress-all, which reduces the size of the
45- # compiled binaries. If binaries grow over 2GB, they will fail to link. This is a problem
46- # for us, as the default set of CUDA capabilities we build can regularly cause this to
47- # occur (for example, with Magma).
48- postInstall = (oldAttrs.postInstall or "") + ''
49- mkdir -p $out/nix-support
50- cat <<EOF >> $out/nix-support/setup-hook
51- cmakeFlags+=' -DCUDA_HOST_COMPILER=${cc}/bin'
52- cmakeFlags+=' -DCMAKE_CUDA_HOST_COMPILER=${cc}/bin'
53- if [ -z "\''${CUDAHOSTCXX-}" ]; then
54- export CUDAHOSTCXX=${cc}/bin;
55- fi
56- export NVCC_PREPEND_FLAGS+=' --compiler-bindir=${cc}/bin -Xfatbin=-compress-all'
57- EOF
58- '';
59 });
6061 cuda_nvprof = prev.cuda_nvprof.overrideAttrs (oldAttrs: {
···27 inherit (prev.backendStdenv) cc;
28 in
29 {
30+ # Required by cmake's enable_language(CUDA) to build a test program
31+ # When implementing cross-compilation support: this is
32+ # final.pkgs.targetPackages.cudaPackages.cuda_cudart
33+ env.cudartRoot = "${prev.lib.getDev final.cuda_cudart}";
3435+ # Point NVCC at a compatible compiler
0003637+ # Desiredata: whenever a package (e.g. magma) adds cuda_nvcc to
38+ # nativeBuildInputs (offsets `(-1, 0)`), magma should also source the
39+ # setupCudaHook, i.e. we want it the hook to be propagated into the
40+ # same nativeBuildInputs.
41+ #
42+ # Logically, cuda_nvcc should include the hook in depsHostHostPropagated,
43+ # so that the final offsets for the propagated hook would be `(-1, 0) +
44+ # (0, 0) = (-1, 0)`.
45+ #
46+ # In practice, TargetTarget appears to work:
47+ # https://gist.github.com/fd80ff142cd25e64603618a3700e7f82
48+ depsTargetTargetPropagated = [
49+ final.setupCudaHook
50+ ];
000000051 });
5253 cuda_nvprof = prev.cuda_nvprof.overrideAttrs (oldAttrs: {
···4, avxSupport ? stdenv.hostPlatform.avxSupport
5, avx2Support ? stdenv.hostPlatform.avx2Support
6, avx512Support ? stdenv.hostPlatform.avx512Support
07# Enable NIVIA GPU support
8# Note, that this needs to be built on a system with a GPU
9# present for the tests to succeed.
10-, enableCuda ? false
11# type of GPU architecture
12, nvidiaArch ? "sm_60"
13, cudatoolkit
···4, avxSupport ? stdenv.hostPlatform.avxSupport
5, avx2Support ? stdenv.hostPlatform.avx2Support
6, avx512Support ? stdenv.hostPlatform.avx512Support
7+, config
8# Enable NIVIA GPU support
9# Note, that this needs to be built on a system with a GPU
10# present for the tests to succeed.
11+, enableCuda ? config.cudaSupport
12# type of GPU architecture
13, nvidiaArch ? "sm_60"
14, cudatoolkit
···37, blas
38, enableContrib ? true
3940-, enableCuda ? (config.cudaSupport or false) && stdenv.hostPlatform.isx86_64
41, enableCublas ? enableCuda
42, enableCudnn ? false # NOTE: CUDNN has a large impact on closure size so we disable it by default
43, enableCufft ? enableCuda
···37, blas
38, enableContrib ? true
3940+, enableCuda ? config.cudaSupport && stdenv.hostPlatform.isx86_64
41, enableCublas ? enableCuda
42, enableCudnn ? false # NOTE: CUDNN has a large impact on closure size so we disable it by default
43, enableCufft ? enableCuda
+2-2
pkgs/development/libraries/openmpi/default.nix
···1{ lib, stdenv, fetchurl, gfortran, perl, libnl
2, rdma-core, zlib, numactl, libevent, hwloc, targetPackages, symlinkJoin
3, libpsm2, libfabric, pmix, ucx
4-5# Enable CUDA support
6-, cudaSupport ? false, cudatoolkit
78# Enable the Sun Grid Engine bindings
9, enableSGE ? false
···17# that in nix as well. It would make some things easier and less confusing, but
18# it would also make the default tensorflow package unfree. See
19# https://groups.google.com/a/tensorflow.org/forum/#!topic/developers/iRCt5m4qUz0
20-, cudaSupport ? false
021, cudaPackages ? { }
22, cudaCapabilities ? cudaPackages.cudaFlags.cudaCapabilities
23, mklSupport ? false, mkl
···17# that in nix as well. It would make some things easier and less confusing, but
18# it would also make the default tensorflow package unfree. See
19# https://groups.google.com/a/tensorflow.org/forum/#!topic/developers/iRCt5m4qUz0
20+, config
21+, cudaSupport ? config.cudaSupport
22, cudaPackages ? { }
23, cudaCapabilities ? cudaPackages.cudaFlags.cudaCapabilities
24, mklSupport ? false, mkl
···1# This file is autogenerated! Run ./update.sh to regenerate.
2{
3- version = "20230625";
4- sourceHash = "sha256-olRaUVnCri/sJU6ob+QgNxEZF8GzVxxEh8zdNJIZlYY=";
5- outputHash = "sha256-zSlMpAPbW7ewEBzDre47/7NJyy2pC0GSbkyOVVi+4gU=";
06}
···1# This file is autogenerated! Run ./update.sh to regenerate.
2{
3+ version = "unstable-2023-07-24";
4+ revision = "59fbffa9ec8e4b0b31d2d13e715cf6580ad0e99c";
5+ sourceHash = "sha256-WyO/+fxQljfo6OXLC8/BomGmKtUQaJ1Lt9V5Fdv172g=";
6+ outputHash = "sha256-wHWPSyqxP+MGmerbc2v/hclFFJ7qKCDsupK5GASjp8s=";
7}
···1-# Wrap only the haskell-related tests from tests.writers
2-# in their own derivation for Hydra CI in the haskell-updates
3-# jobset. Can presumably removed as soon as tests.writers is
4-# always green on darwin as well:
5-# https://github.com/NixOS/nixpkgs/issues/126182
6-{ runCommand, tests }:
7-8-let
9- inherit (tests.writers)
10- writeTest
11- bin
12- simple
13- path
14- ;
15-in
16-17-runCommand "test-haskell-writers" {
18- meta = {
19- inherit (tests.writers.meta) platforms;
20- };
21-} ''
22- ${writeTest "success" "test-haskell-bin-writer" "${bin.haskell}/bin/${bin.haskell.name}"}
23- ${writeTest "success" "test-haskell-simple-writer" simple.haskell}
24- ${writeTest "success" "test-haskell-path-writer" path.haskell}
25- touch $out
26-''
···103 passthru = {
104 # This is set primarily to help find-tarballs.nix to do its job
105 packages = pkgList.all;
106- # useful for inclusion in the `fonts.fonts` nixos option or for use in devshells
107 fonts = "${texmfroot}/texmf-dist/fonts";
108 };
109
···103 passthru = {
104 # This is set primarily to help find-tarballs.nix to do its job
105 packages = pkgList.all;
106+ # useful for inclusion in the `fonts.packages` nixos option or for use in devshells
107 fonts = "${texmfroot}/texmf-dist/fonts";
108 };
109