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