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