2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
importlib-metadata,
|
|
|
|
poetry-core,
|
|
|
|
pytest-mock,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
2023-05-24 13:37:59 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "single-source";
|
|
|
|
version = "0.3.0";
|
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "rabbit72";
|
|
|
|
repo = "single-source";
|
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-bhfMRIeJUd5JhN2tPww7fdbmHQ7ypcsZrYSa55v0+W8=";
|
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ poetry-core ];
|
2023-05-24 13:37:59 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = [ importlib-metadata ];
|
2023-05-24 13:37:59 +00:00
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
pytest-mock
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "single_source" ];
|
2023-05-24 13:37:59 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
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}";
|
|
|
|
license = licenses.mit;
|
2024-07-31 10:19:44 +00:00
|
|
|
maintainers = [ ];
|
2023-05-24 13:37:59 +00:00
|
|
|
};
|
|
|
|
}
|