depot/third_party/nixpkgs/pkgs/development/python-modules/forbiddenfruit/default.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

49 lines
1 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
pynose,
setuptools,
}:
buildPythonPackage rec {
version = "0.1.4";
pname = "forbiddenfruit";
pyproject = true;
src = fetchFromGitHub {
owner = "clarete";
repo = "forbiddenfruit";
rev = "refs/tags/${version}";
hash = "sha256-yHIZsVn2UVmWeBNIzWDE6AOwAXZilPqXo+bVtXqGkJk=";
};
build-system = [ setuptools ];
env.FFRUIT_EXTENSION = "true";
pythonImportsCheck = [ "forbiddenfruit" ];
nativeCheckInputs = [ pynose ];
# https://github.com/clarete/forbiddenfruit/pull/47 required to switch to pytest
checkPhase = ''
runHook preCheck
find ./build -name '*.so' -exec mv {} tests/unit \;
nosetests
runHook postCheck
'';
meta = with lib; {
description = "Patch python built-in objects";
homepage = "https://github.com/clarete/forbiddenfruit";
changelog = "https://github.com/clarete/forbiddenfruit/releases/tag/${version}";
license = with licenses; [
mit
gpl3Plus
];
maintainers = with maintainers; [ ];
};
}