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