diff options
author | Connor Baker <connor.baker@tweag.io> | 2024-03-27 20:16:29 +0000 |
---|---|---|
committer | Connor Baker <connor.baker@tweag.io> | 2024-04-01 01:14:28 +0000 |
commit | 93b08a7061971a3cdfe2ed1f5740650d9a917013 (patch) | |
tree | 852fb9713fd3bf4c5b0c048bd48682edf3ea8fa5 /pkgs/development/cuda-modules/generic-builders | |
parent | 7f797a698f835e6744971c17d33abb5485729bd3 (diff) |
{pkgs/development/cuda-modules,pkgs/test/cuda,pkgs/top-level/cuda-packages.nix}: reformat all CUDA files with nixfmt-rfc-style 2023-03-01
```bash nix run github:NixOS/nixpkgs/ab6071eb54cc9b66dda436111d4f569e4e56cbf4#nixfmt-rfc-style -L --allow-import-from-derivation -- pkgs/development/cuda-modules pkgs/test/cuda pkgs/top-level/cuda-packages.nix ```
Diffstat (limited to 'pkgs/development/cuda-modules/generic-builders')
-rw-r--r-- | pkgs/development/cuda-modules/generic-builders/manifest.nix | 493 | ||||
-rw-r--r-- | pkgs/development/cuda-modules/generic-builders/multiplex.nix | 34 |
2 files changed, 263 insertions, 264 deletions
diff --git a/pkgs/development/cuda-modules/generic-builders/manifest.nix b/pkgs/development/cuda-modules/generic-builders/manifest.nix index 4f40b7f01dc28..73c34b0c86ee5 100644 --- a/pkgs/development/cuda-modules/generic-builders/manifest.nix +++ b/pkgs/development/cuda-modules/generic-builders/manifest.nix @@ -50,144 +50,139 @@ let sourceMatchesHost = flags.getNixSystem redistArch == stdenv.hostPlatform.system; in -backendStdenv.mkDerivation ( - finalAttrs: { - # NOTE: Even though there's no actual buildPhase going on here, the derivations of the - # redistributables are sensitive to the compiler flags provided to stdenv. The patchelf package - # is sensitive to the compiler flags provided to stdenv, and we depend on it. As such, we are - # also sensitive to the compiler flags provided to stdenv. - inherit pname; - inherit (redistribRelease) version; +backendStdenv.mkDerivation (finalAttrs: { + # NOTE: Even though there's no actual buildPhase going on here, the derivations of the + # redistributables are sensitive to the compiler flags provided to stdenv. The patchelf package + # is sensitive to the compiler flags provided to stdenv, and we depend on it. As such, we are + # also sensitive to the compiler flags provided to stdenv. + inherit pname; + inherit (redistribRelease) version; - # Don't force serialization to string for structured attributes, like outputToPatterns - # and brokenConditions. - # Avoids "set cannot be coerced to string" errors. - __structuredAttrs = true; + # Don't force serialization to string for structured attributes, like outputToPatterns + # and brokenConditions. + # Avoids "set cannot be coerced to string" errors. + __structuredAttrs = true; - # Keep better track of dependencies. - strictDeps = true; + # Keep better track of dependencies. + strictDeps = true; - # NOTE: Outputs are evaluated jointly with meta, so in the case that this is an unsupported platform, - # we still need to provide a list of outputs. - outputs = - let - # Checks whether the redistributable provides an output. - hasOutput = - output: - attrsets.attrByPath - [ - redistArch - "outputs" - output - ] - false - featureRelease; - # Order is important here so we use a list. - possibleOutputs = [ - "bin" - "lib" - "static" - "dev" - "doc" - "sample" - "python" - ]; - # Filter out outputs that don't exist in the redistributable. - # NOTE: In the case the redistributable isn't supported on the target platform, - # we will have `outputs = [ "out" ] ++ possibleOutputs`. This is of note because platforms which - # aren't supported would otherwise have evaluation errors when trying to access outputs other than `out`. - # The alternative would be to have `outputs = [ "out" ]` when`redistArch = "unsupported"`, but that would - # require adding guards throughout the entirety of the CUDA package set to ensure `cudaSupport` is true -- - # recall that OfBorg will evaluate packages marked as broken and that `cudaPackages` will be evaluated with - # `cudaSupport = false`! - additionalOutputs = - if redistArch == "unsupported" - then possibleOutputs - else builtins.filter hasOutput possibleOutputs; - # The out output is special -- it's the default output and we always include it. - outputs = [ "out" ] ++ additionalOutputs; - in - outputs; - - # Traversed in the order of the outputs speficied in outputs; - # entries are skipped if they don't exist in outputs. - outputToPatterns = { - bin = [ "bin" ]; - dev = [ - "share/pkgconfig" - "**/*.pc" - "**/*.cmake" - ]; - lib = [ + # NOTE: Outputs are evaluated jointly with meta, so in the case that this is an unsupported platform, + # we still need to provide a list of outputs. + outputs = + let + # Checks whether the redistributable provides an output. + hasOutput = + output: + attrsets.attrByPath [ + redistArch + "outputs" + output + ] false featureRelease; + # Order is important here so we use a list. + possibleOutputs = [ + "bin" "lib" - "lib64" + "static" + "dev" + "doc" + "sample" + "python" ]; - static = ["**/*.a"]; - sample = ["samples"]; - python = ["**/*.whl"]; - }; + # Filter out outputs that don't exist in the redistributable. + # NOTE: In the case the redistributable isn't supported on the target platform, + # we will have `outputs = [ "out" ] ++ possibleOutputs`. This is of note because platforms which + # aren't supported would otherwise have evaluation errors when trying to access outputs other than `out`. + # The alternative would be to have `outputs = [ "out" ]` when`redistArch = "unsupported"`, but that would + # require adding guards throughout the entirety of the CUDA package set to ensure `cudaSupport` is true -- + # recall that OfBorg will evaluate packages marked as broken and that `cudaPackages` will be evaluated with + # `cudaSupport = false`! + additionalOutputs = + if redistArch == "unsupported" then possibleOutputs else builtins.filter hasOutput possibleOutputs; + # The out output is special -- it's the default output and we always include it. + outputs = [ "out" ] ++ additionalOutputs; + in + outputs; - # Useful for introspecting why something went wrong. Maps descriptions of why the derivation would be marked as - # broken on have badPlatforms include the current platform. + # Traversed in the order of the outputs speficied in outputs; + # entries are skipped if they don't exist in outputs. + outputToPatterns = { + bin = [ "bin" ]; + dev = [ + "share/pkgconfig" + "**/*.pc" + "**/*.cmake" + ]; + lib = [ + "lib" + "lib64" + ]; + static = [ "**/*.a" ]; + sample = [ "samples" ]; + python = [ "**/*.whl" ]; + }; - # brokenConditions :: AttrSet Bool - # Sets `meta.broken = true` if any of the conditions are true. - # Example: Broken on a specific version of CUDA or when a dependency has a specific version. - brokenConditions = { }; + # Useful for introspecting why something went wrong. Maps descriptions of why the derivation would be marked as + # broken on have badPlatforms include the current platform. - # 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). - badPlatformsConditions = { - "No source" = !sourceMatchesHost; - }; + # brokenConditions :: AttrSet Bool + # Sets `meta.broken = true` if any of the conditions are true. + # Example: Broken on a specific version of CUDA or when a dependency has a specific version. + brokenConditions = { }; - # src :: Optional Derivation - src = trivial.pipe redistArch [ - # If redistArch doesn't exist in redistribRelease, return null. - (redistArch: redistribRelease.${redistArch} or null) - # If the release is non-null, fetch the source; otherwise, return null. - (trivial.mapNullable ( - { relative_path, sha256, ... }: - fetchurl { - url = "https://developer.download.nvidia.com/compute/${redistName}/redist/${relative_path}"; - inherit sha256; - } - )) - ]; + # 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). + badPlatformsConditions = { + "No source" = !sourceMatchesHost; + }; - # Handle the pkg-config files: - # 1. No FHS - # 2. Location expected by the pkg-config wrapper - # 3. Generate unversioned names too - postPatch = '' - for path in pkg-config pkgconfig ; do - [[ -d "$path" ]] || continue - mkdir -p share/pkgconfig - mv "$path"/* share/pkgconfig/ - rmdir "$path" - done + # src :: Optional Derivation + src = trivial.pipe redistArch [ + # If redistArch doesn't exist in redistribRelease, return null. + (redistArch: redistribRelease.${redistArch} or null) + # If the release is non-null, fetch the source; otherwise, return null. + (trivial.mapNullable ( + { relative_path, sha256, ... }: + fetchurl { + url = "https://developer.download.nvidia.com/compute/${redistName}/redist/${relative_path}"; + inherit sha256; + } + )) + ]; - for pc in share/pkgconfig/*.pc ; do - sed -i \ - -e "s|^cudaroot\s*=.*\$|cudaroot=''${!outputDev}|" \ - -e "s|^libdir\s*=.*/lib\$|libdir=''${!outputLib}/lib|" \ - -e "s|^includedir\s*=.*/include\$|includedir=''${!outputDev}/include|" \ - "$pc" - done + # Handle the pkg-config files: + # 1. No FHS + # 2. Location expected by the pkg-config wrapper + # 3. Generate unversioned names too + postPatch = '' + for path in pkg-config pkgconfig ; do + [[ -d "$path" ]] || continue + mkdir -p share/pkgconfig + mv "$path"/* share/pkgconfig/ + rmdir "$path" + done - # E.g. cuda-11.8.pc -> cuda.pc - for pc in share/pkgconfig/*-"$majorMinorVersion.pc" ; do - ln -s "$(basename "$pc")" "''${pc%-$majorMinorVersion.pc}".pc - done - ''; + for pc in share/pkgconfig/*.pc ; do + sed -i \ + -e "s|^cudaroot\s*=.*\$|cudaroot=''${!outputDev}|" \ + -e "s|^libdir\s*=.*/lib\$|libdir=''${!outputLib}/lib|" \ + -e "s|^includedir\s*=.*/include\$|includedir=''${!outputDev}/include|" \ + "$pc" + done + + # E.g. cuda-11.8.pc -> cuda.pc + for pc in share/pkgconfig/*-"$majorMinorVersion.pc" ; do + ln -s "$(basename "$pc")" "''${pc%-$majorMinorVersion.pc}".pc + done + ''; - env.majorMinorVersion = cudaMajorMinorVersion; + env.majorMinorVersion = cudaMajorMinorVersion; - # We do need some other phases, like configurePhase, so the multiple-output setup hook works. - dontBuild = true; + # We do need some other phases, like configurePhase, so the multiple-output setup hook works. + dontBuild = true; - nativeBuildInputs = [ + nativeBuildInputs = + [ autoPatchelfHook # This hook will make sure libcuda can be found # in typically /lib/opengl-driver by adding that @@ -205,142 +200,140 @@ backendStdenv.mkDerivation ( autoAddCudaCompatRunpath ]; - buildInputs = - [ - # autoPatchelfHook will search for a libstdc++ and we're giving it - # one that is compatible with the rest of nixpkgs, even when - # nvcc forces us to use an older gcc - # NB: We don't actually know if this is the right thing to do - stdenv.cc.cc.lib - ]; + buildInputs = [ + # autoPatchelfHook will search for a libstdc++ and we're giving it + # one that is compatible with the rest of nixpkgs, even when + # nvcc forces us to use an older gcc + # NB: We don't actually know if this is the right thing to do + stdenv.cc.cc.lib + ]; - # Picked up by autoPatchelf - # Needed e.g. for libnvrtc to locate (dlopen) libnvrtc-builtins - appendRunpaths = ["$ORIGIN"]; + # Picked up by autoPatchelf + # Needed e.g. for libnvrtc to locate (dlopen) libnvrtc-builtins + appendRunpaths = [ "$ORIGIN" ]; - # NOTE: We don't need to check for dev or doc, because those outputs are handled by - # the multiple-outputs setup hook. - # NOTE: moveToOutput operates on all outputs: - # https://github.com/NixOS/nixpkgs/blob/2920b6fc16a9ed5d51429e94238b28306ceda79e/pkgs/build-support/setup-hooks/multiple-outputs.sh#L105-L107 - installPhase = - let - mkMoveToOutputCommand = - output: - let - template = pattern: ''moveToOutput "${pattern}" "${"$" + output}"''; - patterns = finalAttrs.outputToPatterns.${output} or []; - in - strings.concatMapStringsSep "\n" template patterns; - in - # Pre-install hook - '' - runHook preInstall - '' - # Handle the existence of libPath, which requires us to re-arrange the lib directory - + strings.optionalString (libPath != null) '' - full_lib_path="lib/${libPath}" - if [[ ! -d "$full_lib_path" ]] ; then - echo "${finalAttrs.pname}: '$full_lib_path' does not exist, only found:" >&2 - find lib/ -mindepth 1 -maxdepth 1 >&2 - echo "This release might not support your CUDA version" >&2 - exit 1 - fi - echo "Making libPath '$full_lib_path' the root of lib" >&2 - mv "$full_lib_path" lib_new - rm -r lib - mv lib_new lib - '' - # Create the primary output, out, and move the other outputs into it. - + '' - mkdir -p "$out" - mv * "$out" - '' - # Move the outputs into their respective outputs. - + strings.concatMapStringsSep "\n" mkMoveToOutputCommand (builtins.tail finalAttrs.outputs) - # Add a newline to the end of the installPhase, so that the post-install hook doesn't - # get concatenated with the last moveToOutput command. - + "\n" - # Post-install hook - + '' - runHook postInstall - ''; + # NOTE: We don't need to check for dev or doc, because those outputs are handled by + # the multiple-outputs setup hook. + # NOTE: moveToOutput operates on all outputs: + # https://github.com/NixOS/nixpkgs/blob/2920b6fc16a9ed5d51429e94238b28306ceda79e/pkgs/build-support/setup-hooks/multiple-outputs.sh#L105-L107 + installPhase = + let + mkMoveToOutputCommand = + output: + let + template = pattern: ''moveToOutput "${pattern}" "${"$" + output}"''; + patterns = finalAttrs.outputToPatterns.${output} or [ ]; + in + strings.concatMapStringsSep "\n" template patterns; + in + # Pre-install hook + '' + runHook preInstall + '' + # Handle the existence of libPath, which requires us to re-arrange the lib directory + + strings.optionalString (libPath != null) '' + full_lib_path="lib/${libPath}" + if [[ ! -d "$full_lib_path" ]] ; then + echo "${finalAttrs.pname}: '$full_lib_path' does not exist, only found:" >&2 + find lib/ -mindepth 1 -maxdepth 1 >&2 + echo "This release might not support your CUDA version" >&2 + exit 1 + fi + echo "Making libPath '$full_lib_path' the root of lib" >&2 + mv "$full_lib_path" lib_new + rm -r lib + mv lib_new lib + '' + # Create the primary output, out, and move the other outputs into it. + + '' + mkdir -p "$out" + mv * "$out" + '' + # Move the outputs into their respective outputs. + + strings.concatMapStringsSep "\n" mkMoveToOutputCommand (builtins.tail finalAttrs.outputs) + # Add a newline to the end of the installPhase, so that the post-install hook doesn't + # get concatenated with the last moveToOutput command. + + "\n" + # Post-install hook + + '' + runHook postInstall + ''; - doInstallCheck = true; - allowFHSReferences = true; # TODO: Default to `false` - postInstallCheck = '' - echo "Executing postInstallCheck" + doInstallCheck = true; + allowFHSReferences = true; # TODO: Default to `false` + postInstallCheck = '' + echo "Executing postInstallCheck" - if [[ -z "''${allowFHSReferences-}" ]] ; then - mapfile -t outputPaths < <(for o in $(getAllOutputNames); do echo "''${!o}"; done) - if grep --max-count=5 --recursive --exclude=LICENSE /usr/ "''${outputPaths[@]}" ; then - echo "Detected references to /usr" >&2 - exit 1 - fi + if [[ -z "''${allowFHSReferences-}" ]] ; then + mapfile -t outputPaths < <(for o in $(getAllOutputNames); do echo "''${!o}"; done) + if grep --max-count=5 --recursive --exclude=LICENSE /usr/ "''${outputPaths[@]}" ; then + echo "Detected references to /usr" >&2 + exit 1 fi - ''; + fi + ''; - # libcuda needs to be resolved during runtime - autoPatchelfIgnoreMissingDeps = [ - "libcuda.so" - "libcuda.so.*" - ]; + # libcuda needs to be resolved during runtime + autoPatchelfIgnoreMissingDeps = [ + "libcuda.so" + "libcuda.so.*" + ]; - # The out output leverages the same functionality which backs the `symlinkJoin` function in - # Nixpkgs: - # https://github.com/NixOS/nixpkgs/blob/d8b2a92df48f9b08d68b0132ce7adfbdbc1fbfac/pkgs/build-support/trivial-builders/default.nix#L510 - # - # That should allow us to emulate "fat" default outputs without having to actually create them. - # - # It is important that this run after the autoPatchelfHook, otherwise the symlinks in out will reference libraries in lib, creating a circular dependency. - postPhases = ["postPatchelf"]; + # The out output leverages the same functionality which backs the `symlinkJoin` function in + # Nixpkgs: + # https://github.com/NixOS/nixpkgs/blob/d8b2a92df48f9b08d68b0132ce7adfbdbc1fbfac/pkgs/build-support/trivial-builders/default.nix#L510 + # + # That should allow us to emulate "fat" default outputs without having to actually create them. + # + # It is important that this run after the autoPatchelfHook, otherwise the symlinks in out will reference libraries in lib, creating a circular dependency. + postPhases = [ "postPatchelf" ]; - # For each output, create a symlink to it in the out output. - # NOTE: We must recreate the out output here, because the setup hook will have deleted it if it was empty. - postPatchelf = '' - mkdir -p "$out" - for output in $(getAllOutputNames); do - if [[ "$output" != "out" ]]; then - ${meta.getExe lndir} "''${!output}" "$out" - fi - done - ''; + # For each output, create a symlink to it in the out output. + # NOTE: We must recreate the out output here, because the setup hook will have deleted it if it was empty. + postPatchelf = '' + mkdir -p "$out" + for output in $(getAllOutputNames); do + if [[ "$output" != "out" ]]; then + ${meta.getExe lndir} "''${!output}" "$out" + fi + done + ''; - # Make the CUDA-patched stdenv available - passthru.stdenv = backendStdenv; + # Make the CUDA-patched stdenv available + passthru.stdenv = backendStdenv; - # Setting propagatedBuildInputs to false will prevent outputs known to the multiple-outputs - # from depending on `out` by default. - # https://github.com/NixOS/nixpkgs/blob/2920b6fc16a9ed5d51429e94238b28306ceda79e/pkgs/build-support/setup-hooks/multiple-outputs.sh#L196 - # Indeed, we want to do the opposite -- fat "out" outputs that contain all the other outputs. - propagatedBuildOutputs = false; + # Setting propagatedBuildInputs to false will prevent outputs known to the multiple-outputs + # from depending on `out` by default. + # https://github.com/NixOS/nixpkgs/blob/2920b6fc16a9ed5d51429e94238b28306ceda79e/pkgs/build-support/setup-hooks/multiple-outputs.sh#L196 + # Indeed, we want to do the opposite -- fat "out" outputs that contain all the other outputs. + propagatedBuildOutputs = false; - # By default, if the dev output exists it just uses that. - # However, because we disabled propagatedBuildOutputs, dev doesn't contain libraries or - # anything of the sort. To remedy this, we set outputSpecified to true, and use - # outputsToInstall, which tells Nix which outputs to use when the package name is used - # unqualified (that is, without an explicit output). - outputSpecified = true; + # By default, if the dev output exists it just uses that. + # However, because we disabled propagatedBuildOutputs, dev doesn't contain libraries or + # anything of the sort. To remedy this, we set outputSpecified to true, and use + # outputsToInstall, which tells Nix which outputs to use when the package name is used + # unqualified (that is, without an explicit output). + outputSpecified = true; - meta = { - description = "${redistribRelease.name}. By downloading and using the packages you accept the terms and conditions of the ${finalAttrs.meta.license.shortName}"; - sourceProvenance = [sourceTypes.binaryNativeCode]; - broken = lists.any trivial.id (attrsets.attrValues finalAttrs.brokenConditions); - platforms = trivial.pipe supportedRedistArchs [ - # Map each redist arch to the equivalent nix system or null if there is no equivalent. - (builtins.map flags.getNixSystem) - # Filter out unsupported systems - (builtins.filter (nixSystem: !(strings.hasPrefix "unsupported-" nixSystem))) - ]; - badPlatforms = - let - isBadPlatform = lists.any trivial.id (attrsets.attrValues finalAttrs.badPlatformsConditions); - in - lists.optionals isBadPlatform finalAttrs.meta.platforms; - license = licenses.unfree; - maintainers = teams.cuda.members; - # Force the use of the default, fat output by default (even though `dev` exists, which - # causes Nix to prefer that output over the others if outputSpecified isn't set). - outputsToInstall = ["out"]; - }; - } -) + meta = { + description = "${redistribRelease.name}. By downloading and using the packages you accept the terms and conditions of the ${finalAttrs.meta.license.shortName}"; + sourceProvenance = [ sourceTypes.binaryNativeCode ]; + broken = lists.any trivial.id (attrsets.attrValues finalAttrs.brokenConditions); + platforms = trivial.pipe supportedRedistArchs [ + # Map each redist arch to the equivalent nix system or null if there is no equivalent. + (builtins.map flags.getNixSystem) + # Filter out unsupported systems + (builtins.filter (nixSystem: !(strings.hasPrefix "unsupported-" nixSystem))) + ]; + badPlatforms = + let + isBadPlatform = lists.any trivial.id (attrsets.attrValues finalAttrs.badPlatformsConditions); + in + lists.optionals isBadPlatform finalAttrs.meta.platforms; + license = licenses.unfree; + maintainers = teams.cuda.members; + # Force the use of the default, fat output by default (even though `dev` exists, which + # causes Nix to prefer that output over the others if outputSpecified isn't set). + outputsToInstall = [ "out" ]; + }; +}) diff --git a/pkgs/development/cuda-modules/generic-builders/multiplex.nix b/pkgs/development/cuda-modules/generic-builders/multiplex.nix index f2a9c6840ecd0..0b523e56b8c43 100644 --- a/pkgs/development/cuda-modules/generic-builders/multiplex.nix +++ b/pkgs/development/cuda-modules/generic-builders/multiplex.nix @@ -52,7 +52,9 @@ let # - Package: ../modules/${pname}/releases/package.nix # FIXME: do this at the module system level - propagatePlatforms = lib.mapAttrs (redistArch: packages: map (p: { inherit redistArch; } // p) packages); + propagatePlatforms = lib.mapAttrs ( + redistArch: packages: map (p: { inherit redistArch; } // p) packages + ); # All releases across all platforms # See ../modules/${pname}/releases/releases.nix @@ -61,7 +63,7 @@ let # Compute versioned attribute name to be used in this package set # Patch version changes should not break the build, so we only use major and minor # computeName :: Package -> String - computeName = {version, ...}: mkVersionedPackageName pname version; + computeName = { version, ... }: mkVersionedPackageName pname version; # Check whether a package supports our CUDA version and platform. # isSupported :: Package -> Bool @@ -81,16 +83,15 @@ let # All the supported packages we can build for our platform. # perSystemReleases :: List Package - allReleases = lib.pipe releaseSets - [ - (lib.attrValues) - (lists.flatten) - (lib.groupBy (p: lib.versions.majorMinor p.version)) - (lib.mapAttrs (_: builtins.sort preferable)) - (lib.mapAttrs (_: lib.take 1)) - (lib.attrValues) - (lib.concatMap lib.trivial.id) - ]; + allReleases = lib.pipe releaseSets [ + (lib.attrValues) + (lists.flatten) + (lib.groupBy (p: lib.versions.majorMinor p.version)) + (lib.mapAttrs (_: builtins.sort preferable)) + (lib.mapAttrs (_: lib.take 1)) + (lib.attrValues) + (lib.concatMap lib.trivial.id) + ]; newest = builtins.head (builtins.sort preferable allReleases); @@ -115,7 +116,10 @@ let buildPackage = package: let - shims = final.callPackage shimsFn {inherit package; inherit (package) redistArch; }; + shims = final.callPackage shimsFn { + inherit package; + inherit (package) redistArch; + }; name = computeName package; drv = final.callPackage ./manifest.nix { inherit pname; @@ -129,7 +133,9 @@ let # versionedDerivations :: AttrSet Derivation versionedDerivations = builtins.listToAttrs (lists.map buildPackage allReleases); - defaultDerivation = { ${pname} = (buildPackage newest).value; }; + defaultDerivation = { + ${pname} = (buildPackage newest).value; + }; in versionedDerivations // defaultDerivation; in |