diff --git a/pkgs/development/compilers/llvm/14/llvm/default.nix b/pkgs/development/compilers/llvm/14/llvm/default.nix index d2059cc66ba2..05aac728b452 100644 --- a/pkgs/development/compilers/llvm/14/llvm/default.nix +++ b/pkgs/development/compilers/llvm/14/llvm/default.nix @@ -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/"; diff --git a/pkgs/development/compilers/llvm/update.sh b/pkgs/development/compilers/llvm/update.sh index 603c603f275b..95ad356dbd9a 100755 --- a/pkgs/development/compilers/llvm/update.sh +++ b/pkgs/development/compilers/llvm/update.sh @@ -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