From 917e133273aff2979695a53a12d6751615b91b3a Mon Sep 17 00:00:00 2001 From: Jan Malakhovski Date: Thu, 20 Jul 2023 10:57:09 +0000 Subject: [PATCH] nix: patchShebangs tests Without this, building a newer nix (2.15) on an older nix (2.3) with sandboxing enabled will fail, which is problematic for doing a self-contained update on an older system. --- pkgs/tools/package-management/nix/common.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/tools/package-management/nix/common.nix b/pkgs/tools/package-management/nix/common.nix index 19b8d77bb4a7..e79f0f5e3bbe 100644 --- a/pkgs/tools/package-management/nix/common.nix +++ b/pkgs/tools/package-management/nix/common.nix @@ -132,6 +132,10 @@ self = stdenv.mkDerivation { (lib.optionalString (stdenv.hostPlatform.system == "armv5tel-linux" || stdenv.hostPlatform.system == "armv6l-linux") "-latomic") ]; + postPatch = '' + patchShebangs --build tests + ''; + preConfigure = # Copy libboost_context so we don't get all of Boost in our closure. # https://github.com/NixOS/nixpkgs/issues/45462