Files
nixpkgs/pkgs/development/rocm-modules/6/release-attrPaths-gen.sh
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

40 lines
1.1 KiB
Bash
Executable File

#!/usr/bin/env nix-shell
#!nix-shell -i bash -p jq nixVersions.latest
set -euo pipefail
# Generate a list of attr paths that are different when enableRocm = true
# Special case python3*Packages to only build the default python3Packages
rocmDir=$(dirname "$(realpath "$0")")
pkgsTmp=$(mktemp)
pkgsRocmTmp=$(mktemp)
trap "rm -f $pkgsTmp $pkgsRocmTmp" EXIT
echo "Generating attrPaths to compare for pkgs and pkgsRocm" >&2
{
nix-instantiate --eval --strict --json "$rocmDir/release-attrPaths-gen.nix" \
--argstr variant pkgs > "$pkgsTmp" &
nix-instantiate --eval --strict --json "$rocmDir/release-attrPaths-gen.nix" \
--argstr variant pkgsRocm > "$pkgsRocmTmp" &
wait
}
<"$pkgsRocmTmp" >"$rocmDir/release-attrPaths.json" jq --slurpfile def "$pkgsTmp" '
{
"__generatedBy": "'"$0"'",
"attrPaths": [
($def[0] | map({(.p): .o}) | add) as $def_map |
.[] |
select(
($def_map[.p] == null) or
($def_map[.p] != .o)
) |
.p |
gsub("python3\\d+Packages"; "python3Packages")
] | unique
}
'
echo "Generated $rocmDir/release-attrPaths.json" >&2