2023-10-09 19:29:22 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, pythonOlder
|
|
|
|
, importlib-metadata
|
|
|
|
, importlib-resources
|
|
|
|
, setuptools
|
|
|
|
, packaging
|
|
|
|
, tomli
|
2024-02-29 20:09:43 +00:00
|
|
|
, pytestCheckHook
|
2023-10-09 19:29:22 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pkg-about";
|
2024-02-29 20:09:43 +00:00
|
|
|
version = "1.1.5";
|
2023-10-09 19:29:22 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchPypi {
|
2024-02-29 20:09:43 +00:00
|
|
|
inherit pname version;
|
2023-10-09 19:29:22 +00:00
|
|
|
extension = "zip";
|
2024-02-29 20:09:43 +00:00
|
|
|
hash = "sha256-B5u+iJuqHtv4BlGhdWqYxBfS89/S01OXmLyDOQraHfo=";
|
2023-10-09 19:29:22 +00:00
|
|
|
};
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
# tox is listed in build requirements but not actually used to build
|
|
|
|
# keeping it as a requirement breaks the build unnecessarily
|
|
|
|
postPatch = ''
|
2024-02-29 20:09:43 +00:00
|
|
|
sed -i "/requires/s/, 'tox>=[^']*'//" pyproject.toml
|
2024-01-02 11:29:13 +00:00
|
|
|
'';
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
packaging
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
importlib-metadata
|
|
|
|
importlib-resources
|
|
|
|
packaging
|
|
|
|
setuptools
|
|
|
|
tomli
|
|
|
|
];
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
nativeCheckInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2023-10-09 19:29:22 +00:00
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"pkg_about"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python metadata sharing at runtime";
|
|
|
|
homepage = "https://github.com/karpierz/pkg_about/";
|
|
|
|
changelog = "https://github.com/karpierz/pkg_about/blob/${version}/CHANGES.rst";
|
|
|
|
license = licenses.zlib;
|
2024-01-02 11:29:13 +00:00
|
|
|
maintainers = teams.ororatech.members;
|
2023-10-09 19:29:22 +00:00
|
|
|
};
|
|
|
|
}
|