summary refs log tree commit diff
path: root/pkgs/development/python-modules/hatch-vcs/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/hatch-vcs/default.nix')
-rw-r--r--pkgs/development/python-modules/hatch-vcs/default.nix48
1 files changed, 48 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/hatch-vcs/default.nix b/pkgs/development/python-modules/hatch-vcs/default.nix
new file mode 100644
index 00000000000..6e785d0c9a2
--- /dev/null
+++ b/pkgs/development/python-modules/hatch-vcs/default.nix
@@ -0,0 +1,48 @@
+{ lib
+, buildPythonPackage
+, fetchPypi
+, pytestCheckHook
+, pythonOlder
+, git
+, hatchling
+, setuptools-scm
+}:
+
+buildPythonPackage rec {
+  pname = "hatch-vcs";
+  version = "0.2.0";
+  format = "pyproject";
+
+  disabled = pythonOlder "3.7";
+
+  src = fetchPypi {
+    pname = "hatch_vcs";
+    inherit version;
+    sha256 = "sha256-mRPXM7NO7JuwNF0GJsoyFlpK0t4V0c5kPDbQnKkIq/8=";
+  };
+
+  nativeBuildInputs = [
+    hatchling
+  ];
+
+  propagatedBuildInputs = [
+    hatchling
+    setuptools-scm
+  ];
+
+  checkInputs = [
+    git
+    pytestCheckHook
+  ];
+
+  pythonImportsCheck = [
+    "hatch_vcs"
+  ];
+
+  meta = with lib; {
+    description = "A plugin for Hatch that uses your preferred version control system (like Git) to determine project versions";
+    homepage = "https://github.com/ofek/hatch-vcs";
+    license = licenses.mit;
+    maintainers = with maintainers; [ cpcloud ];
+  };
+}