pkgs/top-level/make-tarball.nix: avoid hardlinks

This commit is contained in:
Vladimír Čunát 2024-06-04 08:45:40 +02:00
parent c375910128
commit 72e89d7461
No known key found for this signature in database
GPG Key ID: E747DF1F9575A3AA

View File

@ -55,6 +55,8 @@ pkgs.releaseTools.sourceTarball {
echo "file json-br $packages" >> $out/nix-support/hydra-build-products
'';
# --hard-dereference: reproducibility for src if auto-optimise-store = true
# Some context: https://github.com/NixOS/infra/issues/438
distPhase = ''
mkdir -p $out/tarballs
XZ_OPT="-T0" tar \
@ -71,6 +73,7 @@ pkgs.releaseTools.sourceTarball {
--sort=name \
--mtime="@$SOURCE_DATE_EPOCH" \
--mode=ug+w \
--hard-dereference \
$src $(pwd)/{.version-suffix,.git-revision}
'';
}