2024-06-05 15:53:02 +00:00
|
|
|
|
{
|
|
|
|
|
buildPythonPackage,
|
|
|
|
|
fetchPypi,
|
|
|
|
|
fetchpatch,
|
|
|
|
|
lib,
|
|
|
|
|
nix-update-script,
|
|
|
|
|
pythonOlder,
|
|
|
|
|
flit-core,
|
2023-07-15 17:15:38 +00:00
|
|
|
|
}:
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
|
pname = "pkgutil-resolve-name";
|
|
|
|
|
version = "1.3.10";
|
2023-10-09 19:29:22 +00:00
|
|
|
|
format = "pyproject";
|
2023-07-15 17:15:38 +00:00
|
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
|
pname = "pkgutil_resolve_name";
|
|
|
|
|
inherit version;
|
|
|
|
|
hash = "sha256-NX1snmp1VlPP14iTgXwIU682XdUeyX89NYqBk3O70XQ=";
|
|
|
|
|
};
|
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
|
patches = [
|
|
|
|
|
# Raise flit-core version constrains
|
2024-06-05 15:53:02 +00:00
|
|
|
|
(fetchpatch {
|
|
|
|
|
# https://github.com/graingert/pkgutil-resolve-name/pull/5
|
2023-10-09 19:29:22 +00:00
|
|
|
|
url = "https://github.com/graingert/pkgutil-resolve-name/commit/042834290c735fa836bb308ce9e93c9f64d67cbe.patch";
|
|
|
|
|
hash = "sha256-M1rcrkdFcoFa3IncPnJaRhnXbelyk56QnMGtmgB6bvk=";
|
|
|
|
|
})
|
|
|
|
|
];
|
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
|
nativeBuildInputs = [ flit-core ];
|
2023-10-09 19:29:22 +00:00
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
|
# has no tests
|
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
|
|
passthru.updateScript = nix-update-script { };
|
|
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
|
homepage = "https://pypi.org/project/pkgutil_resolve_name/";
|
2024-06-20 14:57:18 +00:00
|
|
|
|
description = "Backport of Python 3.9’s pkgutil.resolve_name";
|
2023-07-15 17:15:38 +00:00
|
|
|
|
license = lib.licenses.mit;
|
|
|
|
|
maintainers = with lib.maintainers; [ yajo ];
|
|
|
|
|
};
|
|
|
|
|
}
|