1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 nose, 6}: 7 8buildPythonPackage rec { 9 version = "0.1.4"; 10 format = "setuptools"; 11 pname = "forbiddenfruit"; 12 13 src = fetchFromGitHub { 14 owner = "clarete"; 15 repo = "forbiddenfruit"; 16 rev = version; 17 sha256 = "16chhrxbbmg6lfbzm532fq0v00z8qihcsj0kg2b5jlgnb6qijwn8"; 18 }; 19 20 nativeCheckInputs = [ nose ]; 21 22 preBuild = '' 23 export FFRUIT_EXTENSION="true"; 24 ''; 25 26 # https://github.com/clarete/forbiddenfruit/pull/47 required to switch to pytest 27 checkPhase = '' 28 find ./build -name '*.so' -exec mv {} tests/unit \; 29 nosetests 30 ''; 31 32 meta = with lib; { 33 description = "Patch python built-in objects"; 34 homepage = "https://github.com/clarete/forbiddenfruit"; 35 license = licenses.mit; 36 }; 37}