From 17c840055e86b63267850c95e7acc791fe986eac Mon Sep 17 00:00:00 2001 From: Arnout Engelen Date: Wed, 2 Dec 2020 11:11:28 +0100 Subject: [PATCH] setuptools: stable file ordering for sdist 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. https://github.com/NixOS/nixpkgs/issues/105502 --- pkgs/development/python-modules/setuptools/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/setuptools/default.nix b/pkgs/development/python-modules/setuptools/default.nix index f30e8dd5cdb..987c75ba5a0 100644 --- a/pkgs/development/python-modules/setuptools/default.nix +++ b/pkgs/development/python-modules/setuptools/default.nix @@ -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 = ''