From af52343ae931b7392a317f9cfad7d56b201c9546 Mon Sep 17 00:00:00 2001 From: "Robert T. McGibbon" Date: Tue, 23 Mar 2021 15:52:50 -0400 Subject: [PATCH] python3Packages.forbiddenfruit: unbreak --- .../python-modules/forbiddenfruit/default.nix | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/forbiddenfruit/default.nix b/pkgs/development/python-modules/forbiddenfruit/default.nix index 6ad99a12581e..13c46ba1e8aa 100644 --- a/pkgs/development/python-modules/forbiddenfruit/default.nix +++ b/pkgs/development/python-modules/forbiddenfruit/default.nix @@ -1,6 +1,6 @@ { lib , buildPythonPackage -, fetchPypi +, fetchFromGitHub , nose }: @@ -8,13 +8,20 @@ buildPythonPackage rec { version = "0.1.4"; pname = "forbiddenfruit"; - src = fetchPypi { - inherit pname version; - sha256 = "e3f7e66561a29ae129aac139a85d610dbf3dd896128187ed5454b6421f624253"; + src = fetchFromGitHub { + owner = "clarete"; + repo = "forbiddenfruit"; + rev = version; + sha256 = "16chhrxbbmg6lfbzm532fq0v00z8qihcsj0kg2b5jlgnb6qijwn8"; }; checkInputs = [ nose ]; + preBuild = '' + export FFRUIT_EXTENSION="true"; + ''; + + # https://github.com/clarete/forbiddenfruit/pull/47 required to switch to pytest checkPhase = '' find ./build -name '*.so' -exec mv {} tests/unit \; nosetests @@ -22,7 +29,7 @@ buildPythonPackage rec { meta = with lib; { description = "Patch python built-in objects"; - homepage = "https://pypi.python.org/pypi/forbiddenfruit"; + homepage = "https://github.com/clarete/forbiddenfruit"; license = licenses.mit; };