Merge pull request #317122 from vcunat/p/tarball-hardlinks

pkgs/top-level/make-tarball.nix: avoid hardlinks
This commit is contained in:
Silvan Mosberger 2024-06-04 15:14:33 +02:00 committed by GitHub
commit cc648ec468
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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}
'';
}