From 1d71d2e883e6152dd66f2f7634b7cffc1a7f0584 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 a49d3c781ed8..d06b11c8ee04 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 = [];