2025-07-24 13:55:40 +02:00

52 lines
1012 B
Nix

{
lib,
buildPythonPackage,
fetchPypi,
isPyPy,
# build-systems
setuptools,
# dependencies
cffi,
zope-deferredimport,
zope-interface,
pythonOlder,
}:
buildPythonPackage rec {
pname = "persistent";
version = "6.1.1";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
hash = "sha256-LTIbYOsH75APhals8HH/jDua7m5nm+zEjEbzRX6NnS8=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace-fail "setuptools < 74" "setuptools"
'';
build-system = [ setuptools ];
dependencies = [
zope-interface
zope-deferredimport
]
++ lib.optionals (!isPyPy) [ cffi ];
pythonImportsCheck = [ "persistent" ];
meta = with lib; {
description = "Automatic persistence for Python objects";
homepage = "https://github.com/zopefoundation/persistent/";
changelog = "https://github.com/zopefoundation/persistent/blob/${version}/CHANGES.rst";
license = licenses.zpl21;
maintainers = [ ];
};
}