Merge #171832: python3Packages.limits: fix src reproducibility

...into staging-next
main
Vladimír Čunát 2 years ago
commit bb0c0b95a7
No known key found for this signature in database
GPG Key ID: E747DF1F9575A3AA
  1. 11
      pkgs/development/python-modules/limits/default.nix

@ -26,7 +26,13 @@ buildPythonPackage rec {
owner = "alisaifee";
repo = pname;
rev = version;
hash = "sha256-4Njai0LT72U9Ra4pgHU0ZjF9oZexbijUgLFYaZi/LgE=";
# Upstream uses versioneer, which relies on git attributes substitution.
# This leads to non-reproducible archives on github. Remove the substituted
# file here, and recreate it later based on our version info.
extraPostFetch = ''
rm "$out/limits/_version.py"
'';
hash = "sha256-ja+YbRHCcZ5tFnoofdR44jbkkdDroVUdKeDOt6yE0LI=";
};
propagatedBuildInputs = [
@ -53,6 +59,9 @@ buildPythonPackage rec {
# redis-py-cluster doesn't support redis > 4
substituteInPlace tests/conftest.py \
--replace "import rediscluster" ""
# Recreate _version.py, deleted at fetch time due to non-reproducibility.
echo 'def get_versions(): return {"version": "${version}"}' > limits/_version.py
'';
pythonImportsCheck = [

Loading…
Cancel
Save