From e474f71da420e1357bdd808c5d7e8470919c0ba3 Mon Sep 17 00:00:00 2001 From: Victor Engmark Date: Fri, 22 Oct 2021 12:19:10 +1300 Subject: [PATCH] feat: Fix Python package install issue Works around . --- shell.nix | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/shell.nix b/shell.nix index ace88de8d2..6b6dc4f6d0 100644 --- a/shell.nix +++ b/shell.nix @@ -8,9 +8,32 @@ let sha256 = "03yharwv0lal286d3zy6b7kj4px111s5h3a8nar8banpnqgml7v5"; }) { }; +in +let poetryEnv = pkgs.poetry2nix.mkPoetryEnv { python = pkgs.python38; projectDir = builtins.path { path = ./.; name = "geostore"; }; + overrides = pkgs.poetry2nix.overrides.withDefaults (self: super: { + pip = + if pkgs.lib.versionAtLeast super.pip.version "20.3" then + super.pip.overridePythonAttrs + (old: + let + pname = "pip"; + version = "20.2.4"; + in + { + name = pname + "-" + version; + inherit version; + src = pkgs.fetchFromGitHub { + owner = "pypa"; + repo = pname; + rev = version; + sha256 = "eMVV4ftgV71HLQsSeaOchYlfaJVgzNrwUynn3SA1/Do="; + name = "${pname}-${version}-source"; + }; + }) else super.pip; + }); }; in pkgs.mkShell {