summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsternenseemann <sternenseemann@systemli.org>2024-04-19 12:57:53 +0200
committersternenseemann <sternenseemann@systemli.org>2024-05-27 02:17:30 +0200
commit56d3fcb1930ac0c4cb85fc121e20ade10c112b71 (patch)
tree77eeb9688dd9183e3a88e5b60a7dcc09ba6cfe89
parentMerge pull request #314266 from NixOS/backport-296602-to-staging-24.05 (diff)
downloadnixpkgs-origin/backport-305284-to-release-24.05.tar.gz
srcOnly: reflink if possible and preserve attributesorigin/backport-305284-to-release-24.05
This matches how the default unpackPhase would copy from a store path into the build directory, so it seems wise to match this here. On file systems that support reflinks, this should improve performance as well. (cherry picked from commit e6875d4286c1dc1a046d398f53834d76a46e1603)
-rw-r--r--pkgs/build-support/src-only/default.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkgs/build-support/src-only/default.nix b/pkgs/build-support/src-only/default.nix
index 2b0db0e267aa..cd8572629cad 100644
--- a/pkgs/build-support/src-only/default.nix
+++ b/pkgs/build-support/src-only/default.nix
@@ -13,7 +13,7 @@ let
in
stdenv.mkDerivation (args // {
name = "${name}-source";
- installPhase = "cp -r . $out";
+ installPhase = "cp -pr --reflink=auto -- . $out";
outputs = [ "out" ];
separateDebugInfo = false;
dontUnpack = false;