From 9193d840eb24239b3371e65679be9fab024279fb Mon Sep 17 00:00:00 2001 From: rnhmjoj Date: Wed, 23 Nov 2022 15:46:00 +0100 Subject: [PATCH] pythonPackages.pip: make package reproducible This fixes #201146 by removing the vendored Windows PE binaries. (cherry picked from commit b87d7fa3f98151a77f063c213378b1a85915d9b2) --- pkgs/development/python-modules/pip/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/development/python-modules/pip/default.nix b/pkgs/development/python-modules/pip/default.nix index 1287ec7017e3..5c24679a9cb3 100644 --- a/pkgs/development/python-modules/pip/default.nix +++ b/pkgs/development/python-modules/pip/default.nix @@ -27,6 +27,12 @@ buildPythonPackage rec { nativeBuildInputs = [ bootstrapped-pip ]; + postPatch = '' + # Remove vendored Windows PE binaries + # Note: These are unused but make the package unreproducible. + find -type f -name '*.exe' -delete + ''; + # pip detects that we already have bootstrapped_pip "installed", so we need # to force it a little. pipInstallFlags = [ "--ignore-installed" ];