2021-01-25 09:26:54 +01:00
|
|
|
{ lib
|
2018-10-16 16:06:47 -04:00
|
|
|
, buildPythonPackage
|
2021-03-23 15:52:50 -04:00
|
|
|
, fetchFromGitHub
|
2018-12-02 22:34:27 +01:00
|
|
|
, nose
|
2018-10-16 16:06:47 -04:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2021-02-20 10:09:09 +01:00
|
|
|
version = "0.1.4";
|
2018-10-16 16:06:47 -04:00
|
|
|
pname = "forbiddenfruit";
|
|
|
|
|
2021-03-23 15:52:50 -04:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "clarete";
|
|
|
|
repo = "forbiddenfruit";
|
|
|
|
rev = version;
|
|
|
|
sha256 = "16chhrxbbmg6lfbzm532fq0v00z8qihcsj0kg2b5jlgnb6qijwn8";
|
2018-10-16 16:06:47 -04:00
|
|
|
};
|
|
|
|
|
2018-12-02 22:34:27 +01:00
|
|
|
checkInputs = [ nose ];
|
|
|
|
|
2021-03-23 15:52:50 -04:00
|
|
|
preBuild = ''
|
|
|
|
export FFRUIT_EXTENSION="true";
|
|
|
|
'';
|
|
|
|
|
|
|
|
# https://github.com/clarete/forbiddenfruit/pull/47 required to switch to pytest
|
2018-12-02 22:34:27 +01:00
|
|
|
checkPhase = ''
|
2019-04-23 10:47:39 +02:00
|
|
|
find ./build -name '*.so' -exec mv {} tests/unit \;
|
2018-12-02 22:34:27 +01:00
|
|
|
nosetests
|
|
|
|
'';
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2018-10-16 16:06:47 -04:00
|
|
|
description = "Patch python built-in objects";
|
2021-03-23 15:52:50 -04:00
|
|
|
homepage = "https://github.com/clarete/forbiddenfruit";
|
2018-10-16 16:06:47 -04:00
|
|
|
license = licenses.mit;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|