llvmPackages: Fix the update script
This commit is contained in:
parent
e7eaee7da8
commit
90d9b7c8dc
2 changed files with 9 additions and 2 deletions
|
@ -209,6 +209,9 @@ in stdenv.mkDerivation (rec {
|
|||
|
||||
checkTarget = "check-all";
|
||||
|
||||
# For the update script:
|
||||
passthru.monorepoSrc = monorepoSrc;
|
||||
|
||||
requiredSystemFeatures = [ "big-parallel" ];
|
||||
meta = llvm_meta // {
|
||||
homepage = "https://llvm.org/";
|
||||
|
|
|
@ -20,7 +20,11 @@ sed -Ei \
|
|||
|
||||
readonly ATTRSET="llvmPackages_$VERSION_MAJOR"
|
||||
|
||||
if [ "$VERSION_MAJOR" -ge "13" ]; then
|
||||
if [ "$VERSION_MAJOR" -ge "14" ]; then
|
||||
readonly SOURCES=(
|
||||
"llvm.monorepoSrc"
|
||||
)
|
||||
elif [ "$VERSION_MAJOR" -eq "13" ]; then
|
||||
readonly SOURCES=(
|
||||
"llvm.src"
|
||||
)
|
||||
|
@ -43,7 +47,7 @@ fi
|
|||
for SOURCE in "${SOURCES[@]}"; do
|
||||
echo "Updating the hash of $SOURCE:"
|
||||
declare ATTR="$ATTRSET.$SOURCE"
|
||||
declare OLD_HASH="$(nix eval -f . $ATTR.outputHash)"
|
||||
declare OLD_HASH="$(nix --extra-experimental-features nix-command eval -f . $ATTR.outputHash)"
|
||||
declare NEW_HASH="\"$(nix-prefetch-url -A $ATTR)\""
|
||||
find "$DIR" -type f -exec sed -i "s/$OLD_HASH/$NEW_HASH/" {} +
|
||||
done
|
||||
|
|
Loading…
Reference in a new issue