Skip to content

Commit

Permalink
pkgs/top-level/make-tarball.nix: avoid hardlinks
Browse files Browse the repository at this point in the history
  • Loading branch information
vcunat committed Jun 4, 2024
1 parent c375910 commit 395c38c
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/nix/issues/10395
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 395c38c

Please sign in to comment.