Skip to content
Closed
22 changes: 20 additions & 2 deletions lib/licenses.nix
Original file line number Diff line number Diff line change
Expand Up @@ -1037,20 +1037,38 @@ lib.mapAttrs mkLicense (
};

nvidiaCuda = {
# Nixpkgs used this name historically, but, if you are to change it,
# please ensure shortName is different from that of the redistributable version.
shortName = "CUDA EULA";
fullName = "CUDA Toolkit End User License Agreement (EULA)";
url = "https://docs.nvidia.com/cuda/eula/index.html#cuda-toolkit-supplement-license-agreement";
free = false;
};

nvidiaCudaRedist = {
shortName = "CUDA EULA";
shortName = "CUDA Toolkit"; # As per .json manifests
fullName = "CUDA Toolkit End User License Agreement (EULA)";
url = "https://docs.nvidia.com/cuda/eula/index.html#cuda-toolkit-supplement-license-agreement";
# At the time of writing (May 2025) it's the same text as `nvidiaCuda`,
# but (1) it may change in future, and (2) we're referring not to the text
# but to the service providing the license.
# There's a copy of the same license in each component's directory, e.g. cudart below.
# Note `cudaPackages` automatically replace this `url` for each package based on metadata published upstream:
url = "https://developer.download.nvidia.com/compute/cuda/redist/cuda_cudart/LICENSE.txt";
free = false;
redistributable = true;
};

# A catch-all copyright notice, usually not granting any rights.
# Appears e.g. in TensorRT, warp.
nvidiaProprietary = {
shortName = "NvidiaProprietary";
fullName = "NVIDIA Copyright Notice";
spdxId = "LicenseRef-NvidiaProprietary";
url = null;
free = false;
redistributable = false;
};

obsidian = {
fullName = "Obsidian End User Agreement";
url = "https://obsidian.md/eula";
Expand Down
14 changes: 7 additions & 7 deletions pkgs/by-name/qd/qdiskinfo/package.nix
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this change included in this PR?

Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
qt6,
qdiskinfo,
themeBundle ? null,
unstableGitUpdater,
nix-update-script,
}:

let
Expand All @@ -34,15 +34,15 @@ assert
&& themeBundle' ? rightCharacter
);

stdenv.mkDerivation {
stdenv.mkDerivation (finalAttrs: {
pname = "qdiskinfo";
version = "0.3-unstable-2025-05-22";
version = "0.4";

src = fetchFromGitHub {
owner = "edisionnano";
repo = "QDiskInfo";
rev = "9b7f4fb44e888dde7c9d0e82300d275e8671769d";
hash = "sha256-GqHDTEeZ+dEmCeyFehaNKB8af5PN8ZTSKxm00mkqouk=";
tag = finalAttrs.version;
hash = "sha256-FufbF0oEqpYgXnfzUZJ3tTN2jJoIQX4UB3yURRV7y00=";
};

nativeBuildInputs = [
Expand Down Expand Up @@ -104,7 +104,7 @@ stdenv.mkDerivation {
themeName: themeBundle:
(qdiskinfo.override { inherit themeBundle; }).overrideAttrs { pname = "qdiskinfo-${themeName}"; }
);
updateScript = unstableGitUpdater { };
updateScript = nix-update-script { };
};

meta = {
Expand All @@ -118,4 +118,4 @@ stdenv.mkDerivation {
platforms = lib.platforms.linux;
mainProgram = "QDiskInfo";
};
}
})
38 changes: 0 additions & 38 deletions pkgs/development/cuda-modules/_cuda/db/bootstrap/cuda.nix
Original file line number Diff line number Diff line change
Expand Up @@ -33,44 +33,6 @@
, dontDefaultAfterCudaMajorMinorVersion :: Null | MajorMinorVersion
}
```

`archName`

: The name of the microarchitecture

`cudaCapability`

: The CUDA capability

`isJetson`

: Whether this capability is part of NVIDIA's line of Jetson embedded computers. This field is notable
because it tells us what architecture to build for (as Jetson devices are aarch64).
More on Jetson devices here: https://www.nvidia.com/en-us/autonomous-machines/embedded-systems/
NOTE: These architectures are only built upon request.

`isArchitectureSpecific`

: Whether this capability is an architecture-specific feature set.
NOTE: These architectures are only built upon request.

`isFamilySpecific`

: Whether this capability is a family-specific feature set.
NOTE: These architectures are only built upon request.

`minCudaMajorMinorVersion`

: The minimum (inclusive) CUDA version that supports this capability.

`maxCudaMajorMinorVersion`

: The maximum (exclusive) CUDA version that supports this capability.
`null` means there is no maximum.

`dontDefaultAfterCudaMajorMinorVersion`

: The CUDA version after which to exclude this capability from the list of default capabilities we build.
*/
cudaCapabilityToInfo =
lib.mapAttrs
Expand Down
22 changes: 3 additions & 19 deletions pkgs/development/cuda-modules/_cuda/db/bootstrap/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{ lib }:
{

import ./static.nix
// {
# See ./cuda.nix for documentation.
inherit (import ./cuda.nix { inherit lib; })
cudaCapabilityToInfo
Expand All @@ -9,22 +11,4 @@
inherit (import ./nvcc.nix)
nvccCompatibilities
;

# See ./redist.nix for documentation.
inherit (import ./redist.nix)
redistNames
redistSystems
redistUrlPrefix
;

/**
The path to the CUDA packages root directory, for use with `callPackage` to create new package sets.

# Type

```
cudaPackagesPath :: Path
```
*/
cudaPackagesPath = ./../../..;
}
56 changes: 0 additions & 56 deletions pkgs/development/cuda-modules/_cuda/db/bootstrap/redist.nix

This file was deleted.

92 changes: 92 additions & 0 deletions pkgs/development/cuda-modules/_cuda/db/bootstrap/static.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
let
lib = import libPath;
columnar = import ../columnar.nix;

inherit (import ../nixpkgs_paths.nix) libPath;

inherit (columnar) unit listToSetOfStr;
in
{
license =
let
redist = lib.licenses.nvidiaCudaRedist;
legacy = lib.licenses.nvidiaCuda;
generic = lib.licenses.nvidiaProprietary;
in
columnar.defaults "shortName"
{
compiled = lib.licenses.unfree;
distribution_path = lib.mkDefault null;
license_path = lib.mkDefault null;
}
{
shortName = {
"CUDA Toolkit" = unit;
"${legacy.shortName}" = unit;
"${generic.shortName}" = unit;
"MIT" = unit;
};
compiled = {
"CUDA Toolkit" = redist;
"${legacy.shortName}" = legacy;
"${generic.shortName}" = generic;
"MIT" = lib.licenses.mit;
};
distribution_path = { };
};
system =
columnar.defaults "nvidia"
{
fromNvidia = { };
isSource = false;
isJetson = false;
jetsonCompatible = false;
}
{
nvidia = {
"source" = unit;
"linux-all" = unit;
"linux-aarch64" = unit;
"linux-sbsa" = unit;
"linux-ppc64le" = unit;
"linux-x86_64" = unit;
"windows-x86_64" = unit;
};
fromNvidia = {
"source" = listToSetOfStr lib.platforms.all;
"linux-aarch64"."aarch64-linux" = unit;
"linux-ppc64le"."powerpc64le-linux" = unit;
"linux-all" = listToSetOfStr lib.platforms.linux;
Comment on lines +56 to +59
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd recommend restricting these to just linux platforms, or even further (e.g., no MIPS or RISC-V).

"linux-sbsa"."aarch64-linux" = unit;
"linux-x86_64"."x86_64-linux" = unit;
"windows-x86_64" = {
"x86_64-windows" = unit;
"x86_64-cygwin" = unit;
};
};
isSource = {
"source" = true;
};
isJetson = {
"linux-aarch64" = true;
};
jetsonCompatible = {
"source" = true;
"linux-aarch64" = true;
};
};
package = {
# Compensate for missing manifests
pname.tensorrt = unit;
name.tensorrt = "TensorRT";
license.tensorrt = lib.licenses.nvidiaProprietary.shortName;
};
output = {
out = unit;
dev = unit;
lib = unit;
bin = unit;
static = unit;
doc = unit;
};
}
Loading