cudaPackages.fixups -> pkgs.cudaFixups

Changed files
+12 -17
pkgs
development
cuda-modules
fixups
generic-builders
top-level
+3 -2
pkgs/development/cuda-modules/fixups/default.nix
···
-
{ lib }:
-
+
let
+
lib = import ../../../../lib;
+
in
lib.concatMapAttrs (
fileName: _type:
let
+2 -2
pkgs/development/cuda-modules/generic-builders/manifest.nix
···
autoPatchelfHook,
backendStdenv,
callPackage,
+
cudaFixups,
cudaLib,
fetchurl,
-
fixups,
lib,
markForCudatoolkitRootHook,
flags,
···
# Last step before returning control to `callPackage` (adds the `.override` method)
# we'll apply (`overrideAttrs`) necessary package-specific "fixup" functions.
# Order is significant.
-
maybeFixup = fixups.${pname} or null;
+
maybeFixup = cudaFixups.${pname} or null;
fixup = if maybeFixup != null then callPackage maybeFixup { } else { };
# Get the redist systems for which package provides distributables.
+2
pkgs/top-level/all-packages.nix
···
cudaLib = import ../development/cuda-modules/lib;
+
cudaFixups = import ../development/cuda-modules/fixups;
+
cudaPackages_11_0 = callPackage ./cuda-packages.nix { cudaMajorMinorVersion = "11.0"; };
cudaPackages_11_1 = callPackage ./cuda-packages.nix { cudaMajorMinorVersion = "11.1"; };
cudaPackages_11_2 = callPackage ./cuda-packages.nix { cudaMajorMinorVersion = "11.2"; };
+5 -13
pkgs/top-level/cuda-packages.nix
···
cudaMajorMinorVersion,
lib,
newScope,
-
pkgs,
stdenv,
}:
let
···
versions
;
-
# MUST be defined outside fix-point (cf. "NAMESET STRICTNESS" above)
-
fixups = import ../development/cuda-modules/fixups { inherit lib; };
-
# Since Jetson capabilities are never built by default, we can check if any of them were requested
# through final.config.cudaCapabilities and use that to determine if we should change some manifest versions.
# Copied from backendStdenv.
···
passthruFunction = final: {
# NOTE:
-
# It is important that cudaLib (and fixups, which will be addressed later) are not part of the package set
-
# fixed-point.
-
# As described by @SomeoneSerge:
+
# It is important that cudaLib and cudaFixups are not part of the package set fixed-point. As described by
+
# @SomeoneSerge:
# > The layering should be: configuration -> (identifies/is part of) cudaPackages -> (is built using) cudaLib.
# > No arrows should point in the reverse directions.
# That is to say that cudaLib should only know about package sets and configurations, because it implements
# functionality for interpreting configurations, resolving them against data, and constructing package sets.
-
inherit
-
cudaMajorMinorVersion
-
fixups
-
lib
-
pkgs
-
;
+
# This decision is driven both by a separation of concerns and by "NAMESET STRICTNESS" (see above).
+
+
inherit cudaMajorMinorVersion;
cudaNamePrefix = "cuda${cudaMajorMinorVersion}";