Skip to content

Commit

Permalink
nix: mitigate nix store optimisiation
Browse files Browse the repository at this point in the history
  • Loading branch information
burgerdev committed Oct 22, 2024
1 parent 8279678 commit 00449ee
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion nix/cc/cryptsetup.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ pkgs.symlinkJoin {
paths = packages;
buildInputs = packages;
postBuild = ''
tar -cf $out/closure.tar --mtime="@$SOURCE_DATE_EPOCH" --sort=name ${closure}
# TODO(burgerdev): should use gnutar!
tar -cf $out/closure.tar --mtime="@$SOURCE_DATE_EPOCH" --sort=name --hard-dereference ${closure}
echo "${rpath}" > $out/rpath
cp ${cc}/nix-support/dynamic-linker $out/dynamic-linker
'';
Expand Down
3 changes: 2 additions & 1 deletion nix/cc/libvirt.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ pkgs.symlinkJoin {
paths = packages;
buildInputs = packages;
postBuild = ''
tar -cf $out/closure.tar --mtime="@$SOURCE_DATE_EPOCH" --sort=name ${closure}
# TODO(burgerdev): should use gnutar!
tar -cf $out/closure.tar --mtime="@$SOURCE_DATE_EPOCH" --sort=name --hard-dereference ${closure}
tar --transform 's+^./+bin/+' -cf $out/bin-linktree.tar --mtime="@$SOURCE_DATE_EPOCH" --sort=name -C $out/bin .
echo "${rpath}" > $out/rpath
cp ${cc}/nix-support/dynamic-linker $out/dynamic-linker
Expand Down

0 comments on commit 00449ee

Please sign in to comment.