2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
poetry-core,
|
2024-09-19 14:19:46 +00:00
|
|
|
toml,
|
2024-06-05 15:53:02 +00:00
|
|
|
pytest-mock,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
2023-05-24 13:37:59 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "single-source";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "0.4.0";
|
|
|
|
pyproject = true;
|
2023-05-24 13:37:59 +00:00
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2023-05-24 13:37:59 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "rabbit72";
|
|
|
|
repo = "single-source";
|
|
|
|
rev = "refs/tags/v${version}";
|
2024-09-19 14:19:46 +00:00
|
|
|
hash = "sha256-4l9ochlscQoWJVkYN8Iq2DsiU7qoOf7nUFYgBOebK/g=";
|
2023-05-24 13:37:59 +00:00
|
|
|
};
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
build-system = [ poetry-core ];
|
2023-05-24 13:37:59 +00:00
|
|
|
|
|
|
|
nativeCheckInputs = [
|
2024-09-19 14:19:46 +00:00
|
|
|
toml
|
2023-05-24 13:37:59 +00:00
|
|
|
pytest-mock
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "single_source" ];
|
2023-05-24 13:37:59 +00:00
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
meta = {
|
2023-05-24 13:37:59 +00:00
|
|
|
description = "Access to the project version in Python code for PEP 621-style projects";
|
|
|
|
homepage = "https://github.com/rabbit72/single-source";
|
|
|
|
changelog = "https://github.com/rabbit72/single-source/releases/tag/v${version}";
|
2024-09-19 14:19:46 +00:00
|
|
|
license = lib.licenses.mit;
|
|
|
|
maintainers = with lib.maintainers; [ nickcao ];
|
2023-05-24 13:37:59 +00:00
|
|
|
};
|
|
|
|
}
|