Skip to content

Commit

Permalink
setuptools: stable file ordering for sdist
Browse files Browse the repository at this point in the history
We already re-pack the source distribution to make the
timestamps consistent, but the result is still not
entirely stable because by default tar does not sort
the files in the archive deterministically. This PR
makes sure the entries are sorted by name.

#105502
  • Loading branch information
raboof authored and FRidh committed Dec 8, 2020
1 parent b46c670 commit 17c8400
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkgs/development/python-modules/setuptools/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ let
# Here we untar the sdist and retar it in order to control the timestamps
# of all the files included
tar -xzf dist/${pname}-${version}.post0.tar.gz -C dist/
tar -czf dist/${name} -C dist/ --mtime="@$SOURCE_DATE_EPOCH" ${pname}-${version}.post0
tar -czf dist/${name} -C dist/ --mtime="@$SOURCE_DATE_EPOCH" --sort=name ${pname}-${version}.post0
'';

installPhase = ''
Expand Down

0 comments on commit 17c8400

Please sign in to comment.