From ab77ad1467a47f9dae0e14be755a6b6c4aaedfa3 Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Wed, 26 Apr 2023 13:02:00 +0200 Subject: [PATCH] buildBazelPackage: never append to fFetchAttrs.installPhase In f8ee061247b365a98322c102c5bfd900395a826c, the fallback installPhase if fFetchAttrs.installPhase is not provided, became dynamically computed. Due to operator precedence this had the side effect of appending to fFetchAttrs.installPhase if it is provided, breaking custom installPhases altogether. --- pkgs/build-support/build-bazel-package/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/build-support/build-bazel-package/default.nix b/pkgs/build-support/build-bazel-package/default.nix index a49d3c781ed83..d06b11c8ee041 100644 --- a/pkgs/build-support/build-bazel-package/default.nix +++ b/pkgs/build-support/build-bazel-package/default.nix @@ -139,7 +139,7 @@ stdenv.mkDerivation (fBuildAttrs // { runHook postBuild ''; - installPhase = fFetchAttrs.installPhase or '' + installPhase = fFetchAttrs.installPhase or ('' runHook preInstall # Remove all built in external workspaces, Bazel will recreate them when building @@ -183,7 +183,7 @@ stdenv.mkDerivation (fBuildAttrs // { (cd $bazelOut/ && tar czf $out --sort=name --mtime='@1' --owner=0 --group=0 --numeric-owner external/) runHook postInstall - ''; + ''); dontFixup = true; allowedRequisites = [];