Change:
should have only eliminated the s and removed some of the platform-based (adding new broken/non-buildable attrs), but instead has changed the actual logic. Since that commit, no longer resolves into but into (note the wrong cuda release), later leading to evaluation errors This currently breaks on Steps to reproduce the behavior: We should probably add some tests for the selection logic as well... A clear and concise description of what you expected to happen. If applicable, add screenshots to help explain your problem. Add any other context about the problem here. <!-- Please @ people who are in the list of the offending package or module. If in doubt, check for whoever last touched something. --Please run and paste the result. Add a :+1: [reaction] to [issues you find important]. [reaction]: [issues you find important]:

Discussion:
# The redistArch is the name of the architecture for which the redistributable is built. # It is `"unsupported"` if the redistributable is not supported on the target platform. redistArch = flags.getRedistArch hostPlatform.system; <ins> sourceMatchesHost = flags.getNixSystem redistArch == stdenv.hostPlatform.system; </ins> in backendStdenv.mkDerivation ( finalAttrs: {

# badPlatformsConditions :: AttrSet Bool # Sets `meta.badPlatforms = meta.platforms` if any of the conditions are true. # Example: Broken on a specific architecture when some condition is met (like targeting Jetson). <del> badPlatformsConditions = { }; </del> <ins> badPlatformsConditions = { "No source" = !sourceMatchesHost; }; </ins> # src :: Optional Derivation src = trivial.pipe redistArch [

# - Package: ../modules/${pname}/releases/package.nix # FIXME: do this at the module system level <del> propagatePlatforms = lib.mapAttrs (platform: subset: map (r: r // { inherit platform; }) subset); </del> <ins> propagatePlatforms = lib.mapAttrs (redistArch: packages: map (p: { inherit redistArch; } // p) packages); </ins> # All releases across all platforms # See ../modules/${pname}/releases/releases.nix

# isSupported :: Package -> Bool isSupported = package: <del> # The `platform` attribute of the package is NVIDIA's name for a redistributable architecture. redistArch == package.platform </del> <ins> redistArch == package.redistArch </ins> && strings.versionAtLeast cudaVersion package.minCudaVersion && strings.versionAtLeast package.maxCudaVersion cudaVersion;

# Value is `"unsupported"` if the platform is not supported. redistArch = flags.getRedistArch hostPlatform.system; <del> allReleases = lists.flatten (builtins.attrValues releaseSets); </del> <ins> preferable = p1: p2: (isSupported p2 -> isSupported p1) && (strings.versionAtLeast p1.version p2.version); </ins> # All the supported packages we can build for our platform. # perSystemReleases :: List Package <del> perSystemReleases = releaseSets.${redistArch} or [ ]; </del> <ins> allReleases = lib.pipe releaseSets [ (builtins.attrValues) (lists.flatten) (builtins.groupBy (p: lib.versions.majorMinor p.version)) (builtins.mapAttrs (_: builtins.sort preferable)) (builtins.mapAttrs (_: lib.take 1)) (builtins.attrValues) (builtins.concatMap lib.trivial.id) ]; </ins> <del> preferable = p1: p2: (isSupported p2 -> isSupported p1) && (strings.versionAtLeast p1.version p2.version); </del> newest = builtins.head (builtins.sort preferable allReleases); # A function which takes the `final` overlay and the `package` being built and returns

buildPackage = package: let <del> shims = final.callPackage shimsFn {inherit package redistArch;}; </del> <ins> shims = final.callPackage shimsFn {inherit package; inherit (package) redistArch; }; </ins> name = computeName package; drv = final.callPackage ./manifest.nix { inherit pname;

attrsets.nameValuePair name fixedDrv; # versionedDerivations :: AttrSet Derivation <del> versionedDerivations = builtins.listToAttrs (lists.map buildPackage perSystemReleases); </del> <ins> versionedDerivations = builtins.listToAttrs (lists.map buildPackage allReleases); </ins> defaultDerivation = { ${pname} = (buildPackage newest).value; }; in