diff options
Diffstat (limited to 'pkgs/development/python-modules/single-source')
-rw-r--r-- | pkgs/development/python-modules/single-source/default.nix | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/single-source/default.nix b/pkgs/development/python-modules/single-source/default.nix new file mode 100644 index 0000000000000..3bf2ff810d507 --- /dev/null +++ b/pkgs/development/python-modules/single-source/default.nix @@ -0,0 +1,49 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, importlib-metadata +, poetry-core +, pytest-mock +, pytestCheckHook +, pythonOlder +}: + +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="; + }; + + nativeBuildInputs = [ + poetry-core + ]; + + propagatedBuildInputs = [ + importlib-metadata + ]; + + nativeCheckInputs = [ + pytest-mock + pytestCheckHook + ]; + + pythonImportsCheck = [ + "single_source" + ]; + + 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; + maintainers = with maintainers; [ ]; + }; +} |