Skip to content

Commit a414dd3

Browse files
authored
Merge pull request #248 from nix-community/pip-20_2_4
overrides: Pin pip to 20.2.4 to work around #244
2 parents ba43d90 + 261ea2b commit a414dd3

File tree

1 file changed

+26
-2
lines changed

1 file changed

+26
-2
lines changed

overrides.nix

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -654,6 +654,28 @@ self: super:
654654
}
655655
);
656656

657+
# Work around https://github.com/nix-community/poetry2nix/issues/244
658+
# where git deps are not picked up as they should
659+
pip =
660+
if lib.versionAtLeast super.pip.version "20.3" then
661+
super.pip.overridePythonAttrs
662+
(old:
663+
let
664+
pname = "pip";
665+
version = "20.2.4";
666+
in
667+
{
668+
name = pname + "-" + version;
669+
inherit version;
670+
src = pkgs.fetchFromGitHub {
671+
owner = "pypa";
672+
repo = pname;
673+
rev = version;
674+
sha256 = "eMVV4ftgV71HLQsSeaOchYlfaJVgzNrwUynn3SA1/Do=";
675+
name = "${pname}-${version}-source";
676+
};
677+
}) else super.pip;
678+
657679
poetry-core = super.poetry-core.overridePythonAttrs (old: {
658680
# "Vendor" dependencies (for build-system support)
659681
postPatch = ''
@@ -1275,13 +1297,15 @@ self: super:
12751297
format = "wheel";
12761298
};
12771299
# If "wheel" is built from source
1278-
sourcePackage = (
1300+
sourcePackage = ((
12791301
pkgs.python3.pkgs.override {
12801302
python = self.python;
12811303
}
12821304
).wheel.override {
12831305
inherit (self) buildPythonPackage bootstrapped-pip setuptools;
1284-
};
1306+
}).overrideAttrs (old: {
1307+
inherit (super.wheel) pname name version src;
1308+
});
12851309
in
12861310
if isWheel then wheelPackage else sourcePackage;
12871311

0 commit comments

Comments
 (0)