Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: abbe6217245a
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 548db366fdfe
Choose a head ref
  • 1 commit
  • 3 files changed
  • 2 contributors

Commits on Nov 18, 2020

  1. pythonPackages.setuptools: reproducible sdist (#104009)

    * setuptools: Remove date from release tag
    
    * setuptools: Fix timestamps in sdist
    
    * setuptools: Move untar/retar to buildPhase
    
    * setuptools: Reproducible 44.0
    
    * setuptools: Use $SOURCE_DATE_EPOCH for src
    
    Co-authored-by: Pavol Rusnak <pavol@rusnak.io>
    
    Co-authored-by: Pavol Rusnak <pavol@rusnak.io>
    basile-henry and prusnak authored Nov 18, 2020

    Unverified

    This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
    Copy the full SHA
    548db36 View commit details
11 changes: 10 additions & 1 deletion pkgs/development/python-modules/setuptools/44.0.nix
Original file line number Diff line number Diff line change
@@ -27,14 +27,23 @@ let
name = "${pname}-${version}-source";
};

patches = [
./tag-date.patch
];

buildPhase = ''
${python.pythonForBuild.interpreter} bootstrap.py
${python.pythonForBuild.interpreter} setup.py sdist --formats=gztar
# 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
'';

installPhase = ''
echo "Moving sdist..."
mv dist/*.tar.gz $out
mv dist/${name} $out
'';
};
in buildPythonPackage rec {
11 changes: 10 additions & 1 deletion pkgs/development/python-modules/setuptools/default.nix
Original file line number Diff line number Diff line change
@@ -27,14 +27,23 @@ let
name = "${pname}-${version}-source";
};

patches = [
./tag-date.patch
];

buildPhase = ''
${python.pythonForBuild.interpreter} bootstrap.py
${python.pythonForBuild.interpreter} setup.py sdist --formats=gztar
# 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
'';

installPhase = ''
echo "Moving sdist..."
mv dist/*.tar.gz $out
mv dist/${name} $out
'';
};
in buildPythonPackage rec {
12 changes: 12 additions & 0 deletions pkgs/development/python-modules/setuptools/tag-date.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/setup.cfg b/setup.cfg
index f23714b6..8aaeb330 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,6 +1,6 @@
[egg_info]
tag_build = .post
-tag_date = 1
+tag_date = 0

[aliases]
clean_egg_info = egg_info -Db ''