2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
2024-06-20 14:57:18 +00:00
|
|
|
pynose,
|
|
|
|
setuptools,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2021-03-09 03:18:52 +00:00
|
|
|
version = "0.1.4";
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "forbiddenfruit";
|
2024-06-20 14:57:18 +00:00
|
|
|
pyproject = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-03-20 04:20:00 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "clarete";
|
|
|
|
repo = "forbiddenfruit";
|
2024-06-20 14:57:18 +00:00
|
|
|
rev = "refs/tags/${version}";
|
|
|
|
hash = "sha256-yHIZsVn2UVmWeBNIzWDE6AOwAXZilPqXo+bVtXqGkJk=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-06-20 14:57:18 +00:00
|
|
|
build-system = [ setuptools ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-06-20 14:57:18 +00:00
|
|
|
env.FFRUIT_EXTENSION = "true";
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "forbiddenfruit" ];
|
|
|
|
|
|
|
|
nativeCheckInputs = [ pynose ];
|
2021-03-20 04:20:00 +00:00
|
|
|
|
|
|
|
# https://github.com/clarete/forbiddenfruit/pull/47 required to switch to pytest
|
2020-04-24 23:36:52 +00:00
|
|
|
checkPhase = ''
|
2024-06-20 14:57:18 +00:00
|
|
|
runHook preCheck
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
find ./build -name '*.so' -exec mv {} tests/unit \;
|
|
|
|
nosetests
|
2024-06-20 14:57:18 +00:00
|
|
|
|
|
|
|
runHook postCheck
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Patch python built-in objects";
|
2021-03-20 04:20:00 +00:00
|
|
|
homepage = "https://github.com/clarete/forbiddenfruit";
|
2024-06-20 14:57:18 +00:00
|
|
|
changelog = "https://github.com/clarete/forbiddenfruit/releases/tag/${version}";
|
|
|
|
license = with licenses; [
|
|
|
|
mit
|
|
|
|
gpl3Plus
|
|
|
|
];
|
|
|
|
maintainers = with maintainers; [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|