From 0f7b1d4a721891ba1f0d950fd3c9a4dd20ce63a7 Mon Sep 17 00:00:00 2001 From: Austin Butler Date: Sun, 4 Oct 2020 21:30:51 -0700 Subject: [PATCH] pythonPackages.inquirer: fix build --- .../python-modules/inquirer/default.nix | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/pkgs/development/python-modules/inquirer/default.nix b/pkgs/development/python-modules/inquirer/default.nix index 560ae55293bd..c17c3eb4af88 100644 --- a/pkgs/development/python-modules/inquirer/default.nix +++ b/pkgs/development/python-modules/inquirer/default.nix @@ -1,20 +1,23 @@ -{ stdenv, buildPythonPackage, fetchPypi, python-editor, readchar, blessings, pytest, pytestcov, pexpect, pytest-mock }: +{ stdenv, buildPythonPackage, fetchFromGitHub, python-editor, readchar, blessed, pytest, pytestcov, pexpect, pytest-mock }: buildPythonPackage rec { pname = "inquirer"; version = "2.7.0"; - src = fetchPypi { - inherit pname version; - sha256 = "e819188de0ca7985a99c282176c6f50fb08b0d33867fd1965d3f3e97d6c8f83f"; + # PyPi archive currently broken: https://github.com/magmax/python-inquirer/issues/106 + src = fetchFromGitHub rec { + owner = "magmax"; + repo = "python-inquirer"; + rev = version; + sha256 = "152l5qjgkag8zkr69ax2i5s8xcac1qvyngisrplbnbzwbpf77d0d"; }; - propagatedBuildInputs = [ python-editor readchar blessings ]; + propagatedBuildInputs = [ blessed python-editor readchar ]; - # No real changes in 2.0.0...e0edfa3 postPatch = '' - substituteInPlace setup.py \ - --replace "readchar == 2.0.1" "readchar >= 2.0.0" + substituteInPlace requirements.txt \ + --replace "blessed==1.17.6" "blessed~=1.17" \ + --replace "readchar==2.0.1" "readchar>=2.0.0" ''; checkInputs = [ pytest pytestcov pexpect pytest-mock ];