···3535- `services.avahi.nssmdns` got split into `services.avahi.nssmdns4` and `services.avahi.nssmdns6` which enable the mDNS NSS switch for IPv4 and IPv6 respectively.
3636 Since most mDNS responders only register IPv4 addresses, most users want to keep the IPv6 support disabled to avoid long timeouts.
37373838+- `networking.iproute2.enable` now does not set `environment.etc."iproute2/rt_tables".text`.
3939+4040+ Setting `environment.etc."iproute2/{CONFIG_FILE_NAME}".text` will override the whole configuration file instead of appending it to the upstream configuration file.
4141+4242+ `CONFIG_FILE_NAME` includes `bpf_pinning`, `ematch_map`, `group`, `nl_protos`, `rt_dsfield`, `rt_protos`, `rt_realms`, `rt_scopes`, and `rt_tables`.
4343+3844## Other Notable Changes {#sec-release-24.05-notable-changes}
39454046<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->
···5662 non-child processes. This means you will not be able to attach gdb to an
5763 existing process, but will need to start that process from gdb (so it is a
5864 child). Or you can set `boot.kernel.sysctl."kernel.yama.ptrace_scope"` to 0.
6565+6666+- [Nginx virtual hosts](#opt-services.nginx.virtualHosts) using `forceSSL` or
6767+ `globalRedirect` can now have redirect codes other than 301 through
6868+ `redirectCode`.
59696070- Gitea 1.21 upgrade has several breaking changes, including:
6171 - Custom themes and other assets that were previously stored in `custom/public/*` now belong in `custom/public/assets/*`
···162162 type = types.bool;
163163 default = false;
164164 description = lib.mdDoc ''
165165- Whether to add a separate nginx server block that permanently redirects (301)
166166- all plain HTTP traffic to HTTPS. This will set defaults for
167167- `listen` to listen on all interfaces on the respective default
168168- ports (80, 443), where the non-SSL listens are used for the redirect vhosts.
165165+ Whether to add a separate nginx server block that redirects (defaults
166166+ to 301, configurable with `redirectCode`) all plain HTTP traffic to
167167+ HTTPS. This will set defaults for `listen` to listen on all interfaces
168168+ on the respective default ports (80, 443), where the non-SSL listens
169169+ are used for the redirect vhosts.
169170 '';
170171 };
171172···307308 default = null;
308309 example = "newserver.example.org";
309310 description = lib.mdDoc ''
310310- If set, all requests for this host are redirected permanently to
311311- the given hostname.
311311+ If set, all requests for this host are redirected (defaults to 301,
312312+ configurable with `redirectCode`) to the given hostname.
313313+ '';
314314+ };
315315+316316+ redirectCode = mkOption {
317317+ type = types.ints.between 300 399;
318318+ default = 301;
319319+ example = 308;
320320+ description = lib.mdDoc ''
321321+ HTTP status used by `globalRedirect` and `forceSSL`. Possible usecases
322322+ include temporary (302, 307) redirects, keeping the request method and
323323+ body (307, 308), or explicitly resetting the method to GET (303).
324324+ See <https://developer.mozilla.org/en-US/docs/Web/HTTP/Redirections>.
312325 '';
313326 };
314327
···3030 description = "A general purpose, fast and lightweight editor with a keyboard-centric minimalistic user interface";
3131 license = licenses.mit;
3232 maintainers = with maintainers; [ pacien ];
3333+ mainProgram = "howl";
33343435 # LuaJIT and Howl builds fail for x86_64-darwin and aarch64-linux respectively
3536 platforms = [ "i686-linux" "x86_64-linux" ];
···176176177177178178 base = rec {
179179- pname = "${packageName}-unwrapped";
179179+ pname = "${lib.optionalString ungoogled "ungoogled-"}${packageName}-unwrapped";
180180 inherit (upstream-info) version;
181181 inherit packageName buildType buildPath;
182182···237237 ++ lib.optional pulseSupport libpulseaudio;
238238239239 patches = [
240240- ./cross-compile.patch
240240+ ./patches/cross-compile.patch
241241 # Optional patch to use SOURCE_DATE_EPOCH in compute_build_timestamp.py (should be upstreamed):
242242 ./patches/no-build-timestamps.patch
243243 # For bundling Widevine (DRM), might be replaceable via bundle_widevine_cdm=true in gnFlags:
···256256 })
257257 ] ++ lib.optionals (chromiumVersionAtLeast "120") [
258258 # We need to revert this patch to build M120+ with LLVM 16:
259259- ./chromium-120-llvm-16.patch
259259+ ./patches/chromium-120-llvm-16.patch
260260 ] ++ lib.optionals (!chromiumVersionAtLeast "119.0.6024.0") [
261261 # Fix build with at-spi2-core ≥ 2.49
262262 # This version is still needed for electron.
···387387 # depending on which part of the codebase you are in; see:
388388 # https://github.com/chromium/chromium/blob/d36462cc9279464395aea5e65d0893d76444a296/build/config/BUILDCONFIG.gn#L17-L44
389389 custom_toolchain = "//build/toolchain/linux/unbundle:default";
390390+ host_toolchain = "//build/toolchain/linux/unbundle:default";
391391+ # We only build those specific toolchains when we cross-compile, as native non-cross-compilations would otherwise
392392+ # end up building much more things than they need to (roughtly double the build steps and time/compute):
393393+ } // lib.optionalAttrs (stdenv.buildPlatform != stdenv.hostPlatform) {
390394 host_toolchain = "//build/toolchain/linux/unbundle:host";
391395 v8_snapshot_toolchain = "//build/toolchain/linux/unbundle:host";
392392-396396+ } // {
393397 host_pkg_config = "${pkgsBuildBuild.pkg-config}/bin/pkg-config";
394398 pkg_config = "${pkgsBuildHost.pkg-config}/bin/${stdenv.cc.targetPrefix}pkg-config";
395399
···11-# Build a python package from info made available by setupcfg2nix.
22-#
33-# * src: The source of the package.
44-# * info: The package information generated by setupcfg2nix.
55-# * meta: Standard nixpkgs metadata.
66-# * application: Whether this package is a python library or an
77-# application which happens to be written in python.
88-# * doCheck: Whether to run the test suites.
99-lib: pythonPackages:
1010-{ src, info, meta ? {}, application ? false, doCheck ? true}: let
1111- build = if application
1212- then pythonPackages.buildPythonApplication
1313- else pythonPackages.buildPythonPackage;
1414-in build {
1515- inherit (info) pname version;
1616-1717- inherit src meta doCheck;
1818-1919- nativeBuildInputs = map (p: pythonPackages.${p}) (
2020- (info.setup_requires or []) ++
2121- (lib.optionals doCheck (info.tests_require or []))
2222- );
2323-2424- propagatedBuildInputs = map (p: pythonPackages.${p})
2525- (info.install_requires or []);
2626-}
···11+diff --git a/linux/rust.cmake b/linux/rust.cmake
22+index a96586c..f9b8677 100644
33+--- a/linux/rust.cmake
44++++ b/linux/rust.cmake
55+@@ -2,17 +2,7 @@
66+ # many dependencies we would need to install Corrosion on the system.
77+ # See instructions on https://github.com/AndrewGaspar/corrosion#cmake-install
88+ # Once done, uncomment this line:
99+-# find_package(Corrosion REQUIRED)
1010+-
1111+-include(FetchContent)
1212+-
1313+-FetchContent_Declare(
1414+- Corrosion
1515+- GIT_REPOSITORY https://github.com/AndrewGaspar/corrosion.git
1616+- GIT_TAG origin/master # Optionally specify a version tag or branch here
1717+-)
1818+-
1919+-FetchContent_MakeAvailable(Corrosion)
2020++find_package(Corrosion REQUIRED)
2121+2222+ corrosion_import_crate(MANIFEST_PATH ../intiface-engine-flutter-bridge/Cargo.toml)
2323+
···281281 # Has to be in tools despite mostly being a library,
282282 # because we use a native helper executable from a
283283 # non-cross build in cross builds.
284284- libclc = callPackage ./libclc {
284284+ libclc = callPackage ../common/libclc.nix {
285285 inherit buildLlvmTools;
286286 };
287287 });
···269269 nixSupport.cc-cflags = [ "-fno-exceptions" ];
270270 });
271271272272+ # Has to be in tools despite mostly being a library,
273273+ # because we use a native helper executable from a
274274+ # non-cross build in cross builds.
275275+ libclc = callPackage ../common/libclc.nix {
276276+ inherit buildLlvmTools;
277277+ };
272278 });
273279274280 libraries = lib.makeExtensible (libraries: let
+9-18
pkgs/development/compilers/vlang/default.nix
···11{ lib, stdenv, fetchFromGitHub, glfw, freetype, openssl, makeWrapper, upx, boehmgc, xorg, binaryen, darwin }:
2233let
44- version = "weekly.2023.44";
44+ version = "0.4.3";
55 ptraceSubstitution = ''
66 #include <sys/types.h>
77 #include <sys/ptrace.h>
88 '';
99- # Required for bootstrap.
99+ # vc is the V compiler's source translated to C (needed for boostrap).
1010+ # So we fix its rev to correspond to the V version.
1011 vc = stdenv.mkDerivation {
1112 pname = "v.c";
1212- version = "unstable-2023-10-30";
1313+ version = "0.4.3";
1314 src = fetchFromGitHub {
1415 owner = "vlang";
1516 repo = "vc";
1616- rev = "66b89ab916c13c5781753797d1f4ff08e427bb6b";
1717- hash = "sha256-5Y7/rlcoIHjbf79A1rqFysNFc5+p6CY09MRPQalo7Ak=";
1717+ rev = "5e691a82c01957870b451e06216a9fb3a4e83a18";
1818+ hash = "sha256-Ti2b88NDG1pppj34BeK8+UsT2HiG/jcAF2mHgiBBRaI=";
1819 };
19202021 # patch the ptrace reference for darwin
···3031 markdown = fetchFromGitHub {
3132 owner = "vlang";
3233 repo = "markdown";
3333- rev = "61c47ea0a6c0c79e973a119dcbab3b8fdd0973ca";
3434- hash = "sha256-XBD30Pc9CGXzU1Gy6U0pDpTozYVwfgAvZRjIsnXp8ZM=";
3434+ rev = "0c280130cb7ec410b7d21810d1247956c15b72fc";
3535+ hash = "sha256-Fmhkrg9DBiWxInostNp+WfA3V5GgEIs5+KIYrqZosqY=";
3536 };
3637 boehmgcStatic = boehmgc.override {
3738 enableStatic = true;
···4546 owner = "vlang";
4647 repo = "v";
4748 rev = version;
4848- hash = "sha256-1yFuheSyKfvm4GqKIbXycdzKx3XcD9LSmmuKlcJmteg=";
4949+ hash = "sha256-ZFBQD7SP38VnEMoOnwr/n8zZuLtR7GR3OCYhvfz3apI=";
4950 };
50515152 propagatedBuildInputs = [ glfw freetype openssl ]
···7677 cp -r ${boehmgcStatic}/lib/* ./thirdparty/tcc/lib
7778 '';
78797979- # vcreate_test.v requires git, so we must remove it when building the tools.
8080- preInstall = ''
8181- mv cmd/tools/vcreate/vcreate_test.v $HOME/vcreate_test.v
8282- '';
8383-8480 installPhase = ''
8581 runHook preInstall
8682···10096 $out/lib/v -v $out/lib/cmd/tools/vcreate
1019710298 runHook postInstall
103103- '';
104104-105105- # Return vcreate_test.v and vtest.v, so the user can use it.
106106- postInstall = ''
107107- cp $HOME/vcreate_test.v $out/lib/cmd/tools/vcreate_test.v
10899 '';
109100110101 meta = with lib; {
+19-4
pkgs/development/coq-modules/metacoq/default.nix
···55let
66 repo = "metacoq";
77 owner = "MetaCoq";
88- defaultVersion = with versions; lib.switch coq.coq-version [
88+ defaultVersion = with versions; switch coq.coq-version [
99 { case = "8.11"; out = "1.0-beta2-8.11"; }
1010 { case = "8.12"; out = "1.0-beta2-8.12"; }
1111 # Do not provide 8.13 because it does not compile with equations 1.3 provided by default (only 1.2.3)
···1313 { case = "8.14"; out = "1.1-8.14"; }
1414 { case = "8.15"; out = "1.1-8.15"; }
1515 { case = "8.16"; out = "1.1-8.16"; }
1616+ { case = "8.17"; out = "1.2.1-8.17"; }
1717+ { case = "8.18"; out = "1.2.1-8.18"; }
1618 ] null;
1719 release = {
1820 "1.0-beta2-8.11".sha256 = "sha256-I9YNk5Di6Udvq5/xpLSNflfjRyRH8fMnRzbo3uhpXNs=";
···2426 "1.1-8.14".sha256 = "sha256-6vViCNQl6BnGgOHX3P/OLfFXN4aUfv4RbDokfz2BgQI=";
2527 "1.1-8.15".sha256 = "sha256-qCD3wFW4E+8vSVk4XoZ0EU4PVya0al+JorzS9nzmR/0=";
2628 "1.1-8.16".sha256 = "sha256-cTK4ptxpPPlqxAhasZFX3RpSlsoTZwhTqs2A3BZy9sA=";
2929+ "1.2.1-8.17".sha256 = "sha256-FP4upuRsG8B5Q5FIr76t+ecRirrOUX0D1QiLq0/zMyE=";
3030+ "1.2.1-8.18".sha256 = "sha256-49g5db2Bv8HpltptJdxA7zrmgNFGC6arx5h2mKHhrko=";
2731 };
2832 releaseRev = v: "v${v}";
29333034 # list of core metacoq packages sorted by dependency order
3131- packages = [ "template-coq" "pcuic" "safechecker" "erasure" "all" ];
3535+ packages = if versionAtLeast coq.coq-version "8.17"
3636+ then [ "utils" "common" "template-coq" "pcuic" "safechecker" "template-pcuic" "erasure" "quotation" "safechecker-plugin" "erasure-plugin" "all" ]
3737+ else [ "template-coq" "pcuic" "safechecker" "erasure" "all" ];
32383339 template-coq = metacoq_ "template-coq";
3440···4753 mlPlugin = true;
4854 propagatedBuildInputs = [ equations coq.ocamlPackages.zarith ] ++ metacoq-deps;
49555050- patchPhase = ''
5656+ patchPhase = if versionAtLeast coq.coq-version "8.17" then ''
5757+ patchShebangs ./configure.sh
5858+ patchShebangs ./template-coq/update_plugin.sh
5959+ patchShebangs ./template-coq/gen-src/to-lower.sh
6060+ patchShebangs ./safechecker-plugin/clean_extraction.sh
6161+ patchShebangs ./erasure-plugin/clean_extraction.sh
6262+ echo "CAMLFLAGS+=-w -60 # Unused module" >> ./safechecker/Makefile.plugin.local
6363+ sed -i -e 's/mv $i $newi;/mv $i tmp; mv tmp $newi;/' ./template-coq/gen-src/to-lower.sh ./safechecker-plugin/clean_extraction.sh ./erasure-plugin/clean_extraction.sh
6464+ '' else ''
6565+ patchShebangs ./configure.sh
5166 patchShebangs ./template-coq/update_plugin.sh
5267 patchShebangs ./template-coq/gen-src/to-lower.sh
5368 patchShebangs ./pcuic/clean_extraction.sh
···59746075 configurePhase = optionalString (package == "all") pkgallMake + ''
6176 touch ${pkgpath}/metacoq-config
6262- '' + optionalString (elem package ["safechecker" "erasure"]) ''
7777+ '' + optionalString (elem package ["safechecker" "erasure" "template-pcuic" "quotation" "safechecker-plugin" "erasure-plugin"]) ''
6378 echo "-I ${template-coq}/lib/coq/${coq.coq-version}/user-contrib/MetaCoq/Template/" > ${pkgpath}/metacoq-config
6479 '' + optionalString (package == "single") ''
6580 ./configure.sh local
+74-9
pkgs/development/cuda-modules/README.md
···11-# cuda-modules
11+# Cuda modules
2233> [!NOTE]
44-> This document is meant to help CUDA maintainers understand the structure of the CUDA packages in Nixpkgs. It is not meant to be a user-facing document.
44+> This document is meant to help CUDA maintainers understand the structure of
55+> the CUDA packages in Nixpkgs. It is not meant to be a user-facing document.
56> For a user-facing document, see [the CUDA section of the manual](../../../doc/languages-frameworks/cuda.section.md).
6777-The files in this directory are added (in some way) to the `cudaPackages` package set by [cuda-packages.nix](../../top-level/cuda-packages.nix).
88+The files in this directory are added (in some way) to the `cudaPackages`
99+package set by [cuda-packages.nix](../../top-level/cuda-packages.nix).
810911## Top-level files
10121111-Top-level nix files are included in the initial creation of the `cudaPackages` scope. These are typically required for the creation of the finalized `cudaPackages` scope:
1313+Top-level nix files are included in the initial creation of the `cudaPackages`
1414+scope. These are typically required for the creation of the finalized
1515+`cudaPackages` scope:
12161317- `backend-stdenv.nix`: Standard environment for CUDA packages.
1418- `flags.nix`: Flags set, or consumed by, NVCC in order to build packages.
1519- `gpus.nix`: A list of supported NVIDIA GPUs.
1616-- `nvcc-compatibilities.nix`: NVCC releases and the version range of GCC/Clang they support.
2020+- `nvcc-compatibilities.nix`: NVCC releases and the version range of GCC/Clang
2121+ they support.
17221823## Top-level directories
19242025- `cuda`: CUDA redistributables! Provides extension to `cudaPackages` scope.
2121-- `cudatoolkit`: monolothic CUDA Toolkit run-file installer. Provides extension to `cudaPackages` scope.
2626+- `cudatoolkit`: monolothic CUDA Toolkit run-file installer. Provides extension
2727+ to `cudaPackages` scope.
2228- `cudnn`: NVIDIA cuDNN library.
2329- `cutensor`: NVIDIA cuTENSOR library.
2430- `generic-builders`:
2525- - Contains a builder `manifest.nix` which operates on the `Manifest` type defined in `modules/generic/manifests`. Most packages are built using this builder.
2626- - Contains a builder `multiplex.nix` which leverages the Manifest builder. In short, the Multiplex builder adds multiple versions of a single package to single instance of the CUDA Packages package set. It is used primarily for packages like `cudnn` and `cutensor`.
2727-- `modules`: Nixpkgs modules to check the shape and content of CUDA redistributable and feature manifests. These modules additionally use shims provided by some CUDA packages to allow them to re-use the `genericManifestBuilder`, even if they don't have manifest files of their own. `cudnn` and `tensorrt` are examples of packages which provide such shims. These modules are further described in the [Modules](./modules/README.md) documentation.
3131+ - Contains a builder `manifest.nix` which operates on the `Manifest` type
3232+ defined in `modules/generic/manifests`. Most packages are built using this
3333+ builder.
3434+ - Contains a builder `multiplex.nix` which leverages the Manifest builder. In
3535+ short, the Multiplex builder adds multiple versions of a single package to
3636+ single instance of the CUDA Packages package set. It is used primarily for
3737+ packages like `cudnn` and `cutensor`.
3838+- `modules`: Nixpkgs modules to check the shape and content of CUDA
3939+ redistributable and feature manifests. These modules additionally use shims
4040+ provided by some CUDA packages to allow them to re-use the
4141+ `genericManifestBuilder`, even if they don't have manifest files of their
4242+ own. `cudnn` and `tensorrt` are examples of packages which provide such
4343+ shims. These modules are further described in the
4444+ [Modules](./modules/README.md) documentation.
2845- `nccl`: NVIDIA NCCL library.
2946- `nccl-tests`: NVIDIA NCCL tests.
3047- `saxpy`: Example CMake project that uses CUDA.
3148- `setup-hooks`: Nixpkgs setup hooks for CUDA.
3249- `tensorrt`: NVIDIA TensorRT library.
5050+5151+## Distinguished packages
5252+5353+### Cuda compatibility
5454+5555+[Cuda Compatibility](https://docs.nvidia.com/deploy/cuda-compatibility/),
5656+available as `cudaPackages.cuda_compat`, is a component which makes it possible
5757+to run applications built against a newer CUDA toolkit (for example CUDA 12) on
5858+a machine with an older CUDA driver (for example CUDA 11), which isn't possible
5959+out of the box. At the time of writing, Cuda Compatibility is only available on
6060+the Nvidia Jetson architecture, but Nvidia might release support for more
6161+architectures in the future.
6262+6363+As Cuda Compatibility strictly increases the range of supported applications, we
6464+try our best to enable it by default on supported platforms.
6565+6666+#### Functioning
6767+6868+`cuda_compat` simply provides a new `libcuda.so` (and associated variants) that
6969+needs to be used in place of the default CUDA driver's `libcuda.so`. However,
7070+the other shared libraries of the default driver must still be accessible:
7171+`cuda_compat` isn't a complete drop-in replacement for the driver (and that's
7272+the point, otherwise, it would just be a newer driver).
7373+7474+Nvidia's recommendation is to set `LD_LIBRARY_PATH` to points to `cuda_compat`'s
7575+driver. This is fine for a manual, one-shot usage, but in general setting
7676+`LD_LIBRARY_PATH` is a red flag. This is global state which short-circuits most
7777+of other dynamic libraries resolution mechanisms and can break things in
7878+non-obvious ways, especially with other Nix-built software.
7979+8080+#### Cuda compat with Nix
8181+8282+Since `cuda_compat` is a known derivation, the easy way to do this in Nix would
8383+be to add `cuda_compat` as a dependency of CUDA libraries and applications and
8484+let Nix does its magic by filling the `DT_RUNPATH` fields. However,
8585+`cuda_compat` itself depends on `libnvrm_mem` and `libnvrm_gpu` which are loaded
8686+dynamically at runtime from `/run/opengl-driver`. This doesn't please the Nix
8787+sandbox when building, which can't find those (a second minor issue is that
8888+`addOpenGLRunpathHook` prepends the `/run/opengl-driver` path, so that would
8989+still take precedence).
9090+9191+The current solution is to do something similar to `addOpenGLRunpathHook`: the
9292+`addCudaCompatRunpathHook` prepends to the path to `cuda_compat`'s `libcuda.so`
9393+to the `DT_RUNPATH` of whichever package includes the hook as a dependency, and
9494+we include the hook by default for packages in `cudaPackages` (by adding it as a
9595+inputs in `genericManifestBuilder`). We also make sure it's included after
9696+`addOpenGLRunpathHook`, so that it appears _before_ in the `DT_RUNPATH` and
9797+takes precedence.
+1-1
pkgs/development/cuda-modules/cuda/overrides.nix
···4545 cuda_compat = prev.cuda_compat.overrideAttrs (
4646 prevAttrs: {
4747 env.autoPatchelfIgnoreMissingDeps =
4848- prevAttrs.env.autoPatchelfIgnoreMissingDeps + " libnvrm_gpu.so libnvrm_mem.so";
4848+ prevAttrs.env.autoPatchelfIgnoreMissingDeps + " libnvrm_gpu.so libnvrm_mem.so libnvdla_runtime.so";
4949 # `cuda_compat` only works on aarch64-linux, and only when building for Jetson devices.
5050 brokenConditions = prevAttrs.brokenConditions // {
5151 "Trying to use cuda_compat on aarch64-linux targeting non-Jetson devices" =
···11{
22 # General callPackage-supplied arguments
33 autoAddOpenGLRunpathHook,
44+ autoAddCudaCompatRunpathHook,
45 autoPatchelfHook,
56 backendStdenv,
67 fetchurl,
···126127 # Check e.g. with `patchelf --print-rpath path/to/my/binary
127128 autoAddOpenGLRunpathHook
128129 markForCudatoolkitRootHook
130130+ ]
131131+ # autoAddCudaCompatRunpathHook depends on cuda_compat and would cause
132132+ # infinite recursion if applied to `cuda_compat` itself (beside the fact
133133+ # that it doesn't make sense in the first place)
134134+ ++ lib.optionals (pname != "cuda_compat" && flags.isJetsonBuild) [
135135+ # autoAddCudaCompatRunpathHook must appear AFTER autoAddOpenGLRunpathHook.
136136+ # See its documentation in ./setup-hooks/extension.nix.
137137+ autoAddCudaCompatRunpathHook
129138 ];
130139131140 buildInputs =
+38-9
pkgs/development/cuda-modules/modules/README.md
···11# Modules
2233-Modules as they are used in `modules` exist primarily to check the shape and content of CUDA redistributable and feature manifests. They are ultimately meant to reduce the repetitive nature of repackaging CUDA redistributables.
33+Modules as they are used in `modules` exist primarily to check the shape and
44+content of CUDA redistributable and feature manifests. They are ultimately meant
55+to reduce the repetitive nature of repackaging CUDA redistributables.
4655-Building most redistributables follows a pattern of a manifest indicating which packages are available at a location, their versions, and their hashes. To avoid creating builders for each and every derivation, modules serve as a way for us to use a single `genericManifestBuilder` to build all redistributables.
77+Building most redistributables follows a pattern of a manifest indicating which
88+packages are available at a location, their versions, and their hashes. To avoid
99+creating builders for each and every derivation, modules serve as a way for us
1010+to use a single `genericManifestBuilder` to build all redistributables.
611712## `generic`
81399-The modules in `generic` are reusable components meant to check the shape and content of NVIDIA's CUDA redistributable manifests, our feature manifests (which are derived from NVIDIA's manifests), or hand-crafted Nix expressions describing available packages. They are used by the `genericManifestBuilder` to build CUDA redistributables.
1414+The modules in `generic` are reusable components meant to check the shape and
1515+content of NVIDIA's CUDA redistributable manifests, our feature manifests (which
1616+are derived from NVIDIA's manifests), or hand-crafted Nix expressions describing
1717+available packages. They are used by the `genericManifestBuilder` to build CUDA
1818+redistributables.
10191111-Generally, each package which relies on manifests or Nix release expressions will create an alias to the relevant generic module. For example, the [module for CUDNN](./cudnn/default.nix) aliases the generic module for release expressions, while the [module for CUDA redistributables](./cuda/default.nix) aliases the generic module for manifests.
2020+Generally, each package which relies on manifests or Nix release expressions
2121+will create an alias to the relevant generic module. For example, the [module
2222+for CUDNN](./cudnn/default.nix) aliases the generic module for release
2323+expressions, while the [module for CUDA redistributables](./cuda/default.nix)
2424+aliases the generic module for manifests.
12251313-Alternatively, additional fields or values may need to be configured to account for the particulars of a package. For example, while the release expressions for [CUDNN](./cudnn/releases.nix) and [TensorRT](./tensorrt/releases.nix) are very close, they differ slightly in the fields they have. The [module for CUDNN](./modules/cudnn/default.nix) is able to use the generic module for release expressions, while the [module for TensorRT](./modules/tensorrt/default.nix) must add additional fields to the generic module.
2626+Alternatively, additional fields or values may need to be configured to account
2727+for the particulars of a package. For example, while the release expressions for
2828+[CUDNN](./cudnn/releases.nix) and [TensorRT](./tensorrt/releases.nix) are very
2929+close, they differ slightly in the fields they have. The [module for
3030+CUDNN](./modules/cudnn/default.nix) is able to use the generic module for
3131+release expressions, while the [module for
3232+TensorRT](./modules/tensorrt/default.nix) must add additional fields to the
3333+generic module.
14341535### `manifests`
16361717-The modules in `generic/manifests` define the structure of NVIDIA's CUDA redistributable manifests and our feature manifests.
3737+The modules in `generic/manifests` define the structure of NVIDIA's CUDA
3838+redistributable manifests and our feature manifests.
18391919-NVIDIA's redistributable manifests are retrieved from their web server, while the feature manifests are produced by [`cuda-redist-find-features`](https://github.com/connorbaker/cuda-redist-find-features).
4040+NVIDIA's redistributable manifests are retrieved from their web server, while
4141+the feature manifests are produced by
4242+[`cuda-redist-find-features`](https://github.com/connorbaker/cuda-redist-find-features).
20432144### `releases`
22452323-The modules in `generic/releases` define the structure of our hand-crafted Nix expressions containing information necessary to download and repackage CUDA redistributables. These expressions are created when NVIDIA-provided manifests are unavailable or otherwise unusable. For example, though CUDNN has manifests, a bug in NVIDIA's CI/CD causes manifests for different versions of CUDA to use the same name, which leads to the manifests overwriting each other.
4646+The modules in `generic/releases` define the structure of our hand-crafted Nix
4747+expressions containing information necessary to download and repackage CUDA
4848+redistributables. These expressions are created when NVIDIA-provided manifests
4949+are unavailable or otherwise unusable. For example, though CUDNN has manifests,
5050+a bug in NVIDIA's CI/CD causes manifests for different versions of CUDA to use
5151+the same name, which leads to the manifests overwriting each other.
24522553### `types`
26542727-The modules in `generic/types` define reusable types used in both `generic/manifests` and `generic/releases`.
5555+The modules in `generic/types` define reusable types used in both
5656+`generic/manifests` and `generic/releases`.
···11+# shellcheck shell=bash
22+# Patch all dynamically linked, ELF files with the CUDA driver (libcuda.so)
33+# coming from the cuda_compat package by adding it to the RUNPATH.
44+echo "Sourcing auto-add-cuda-compat-runpath-hook"
55+66+elfHasDynamicSection() {
77+ patchelf --print-rpath "$1" >& /dev/null
88+}
99+1010+autoAddCudaCompatRunpathPhase() (
1111+ local outputPaths
1212+ mapfile -t outputPaths < <(for o in $(getAllOutputNames); do echo "${!o}"; done)
1313+ find "${outputPaths[@]}" -type f -executable -print0 | while IFS= read -rd "" f; do
1414+ if isELF "$f"; then
1515+ # patchelf returns an error on statically linked ELF files
1616+ if elfHasDynamicSection "$f" ; then
1717+ echo "autoAddCudaCompatRunpathHook: patching $f"
1818+ local origRpath="$(patchelf --print-rpath "$f")"
1919+ patchelf --set-rpath "@libcudaPath@:$origRpath" "$f"
2020+ elif (( "${NIX_DEBUG:-0}" >= 1 )) ; then
2121+ echo "autoAddCudaCompatRunpathHook: skipping a statically-linked ELF file $f"
2222+ fi
2323+ fi
2424+ done
2525+)
2626+2727+postFixupHooks+=(autoAddCudaCompatRunpathPhase)
···4444 ./auto-add-opengl-runpath-hook.sh
4545 )
4646 {};
4747+4848+ # autoAddCudaCompatRunpathHook hook must be added AFTER `setupCudaHook`. Both
4949+ # hooks prepend a path with `libcuda.so` to the `DT_RUNPATH` section of
5050+ # patched elf files, but `cuda_compat` path must take precedence (otherwise,
5151+ # it doesn't have any effect) and thus appear first. Meaning this hook must be
5252+ # executed last.
5353+ autoAddCudaCompatRunpathHook =
5454+ final.callPackage
5555+ (
5656+ {makeSetupHook, cuda_compat}:
5757+ makeSetupHook
5858+ {
5959+ name = "auto-add-cuda-compat-runpath-hook";
6060+ substitutions = {
6161+ # Hotfix Ofborg evaluation
6262+ libcudaPath = if final.flags.isJetsonBuild then "${cuda_compat}/compat" else null;
6363+ };
6464+ meta.broken = !final.flags.isJetsonBuild;
6565+ }
6666+ ./auto-add-cuda-compat-runpath.sh
6767+ )
6868+ {};
4769}
+2
pkgs/development/embedded/xc3sprog/default.nix
···1919 cmakeFlags = [
2020 # file RPATH_CHANGE could not write new RPATH
2121 "-DCMAKE_SKIP_BUILD_RPATH=ON"
2222+ # fix build with gcc 11+
2323+ "-DCMAKE_CXX_STANDARD=14"
2224 ];
23252426 meta = with lib; {
···2233stdenv.mkDerivation rec {
44 pname = "tdlib";
55- version = "1.8.21";
55+ version = "1.8.22";
6677 src = fetchFromGitHub {
88 owner = "tdlib";
···1111 # The tdlib authors do not set tags for minor versions, but
1212 # external programs depending on tdlib constrain the minor
1313 # version, hence we set a specific commit with a known version.
1414- rev = "3870c29b158b75ca5e48e0eebd6b5c3a7994a000";
1515- hash = "sha256-MCzgovcEZa34ZkwbbwfXHm2qitHwL2Tpr8p7+PxNhYk=";
1414+ rev = "24893faf75d84b2b885f3f7aeb9d5a3c056fa7be";
1515+ hash = "sha256-4cfnre71+rQSuPrtFJMzIEPYVCZH/W142b4Pn2NxvqI=";
1616 };
17171818 buildInputs = [ gperf openssl readline zlib ];
···859859 sdlmame = throw "'sdlmame' has been renamed to/replaced by 'mame'"; # Converted to throw 2023-09-10
860860 searx = throw "'searx' has been removed as it is unmaintained. Please switch to searxng"; # Added 2023-10-03
861861 session-desktop-appimage = session-desktop;
862862+ setupcfg2nix = throw "'setupcfg2nix' has been removed. Please switch to buildPythonPackage"; # Added 2023-12-12
862863 sequoia = sequoia-sq; # Added 2023-06-26
863864 sexp = sexpp; # Added 2023-07-03
864865 sget = throw "sget has been removed from nixpkgs, as it is not supported upstream anymore see https://github.com/sigstore/sget/issues/145"; # Added 2023-05-26