Skip to content

Commit

Permalink
Merge pull request #317122 from vcunat/p/tarball-hardlinks
Browse files Browse the repository at this point in the history
pkgs/top-level/make-tarball.nix: avoid hardlinks
  • Loading branch information
infinisil committed Jun 4, 2024
2 parents 9658393 + 72e89d7 commit cc648ec
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkgs/top-level/make-tarball.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -71,6 +73,7 @@ pkgs.releaseTools.sourceTarball {
--sort=name \
--mtime="@$SOURCE_DATE_EPOCH" \
--mode=ug+w \
--hard-dereference \
$src $(pwd)/{.version-suffix,.git-revision}
'';
}

0 comments on commit cc648ec

Please sign in to comment.