mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-09 19:13:26 +03:00
cudaPackages.fixups -> pkgs.cudaFixups
This commit is contained in:
parent
c5dad2886a
commit
765529dfff
4 changed files with 12 additions and 17 deletions
|
@ -1,5 +1,6 @@
|
|||
{ lib }:
|
||||
|
||||
let
|
||||
lib = import ../../../../lib;
|
||||
in
|
||||
lib.concatMapAttrs (
|
||||
fileName: _type:
|
||||
let
|
||||
|
|
|
@ -5,9 +5,9 @@
|
|||
autoPatchelfHook,
|
||||
backendStdenv,
|
||||
callPackage,
|
||||
cudaFixups,
|
||||
cudaLib,
|
||||
fetchurl,
|
||||
fixups,
|
||||
lib,
|
||||
markForCudatoolkitRootHook,
|
||||
flags,
|
||||
|
@ -45,7 +45,7 @@ let
|
|||
# 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.
|
||||
|
|
|
@ -2721,6 +2721,8 @@ with pkgs;
|
|||
|
||||
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"; };
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
cudaMajorMinorVersion,
|
||||
lib,
|
||||
newScope,
|
||||
pkgs,
|
||||
stdenv,
|
||||
}:
|
||||
let
|
||||
|
@ -39,9 +38,6 @@ 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.
|
||||
|
@ -54,19 +50,15 @@ let
|
|||
|
||||
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}";
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue