diff --git a/pkgs/development/python-modules/uv-dynamic-versioning/default.nix b/pkgs/development/python-modules/uv-dynamic-versioning/default.nix new file mode 100644 index 000000000000..742b2891f45b --- /dev/null +++ b/pkgs/development/python-modules/uv-dynamic-versioning/default.nix @@ -0,0 +1,71 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + + # build-system + hatchling, + + # dependencies + dunamai, + eval-type-backport, + pydantic, + returns, + tomlkit, + + # tests + gitpython, + pytestCheckHook, + writableTmpDirAsHomeHook, +}: + +buildPythonPackage rec { + pname = "uv-dynamic-versioning"; + version = "0.4.1"; + pyproject = true; + + src = fetchFromGitHub { + owner = "ninoseki"; + repo = "uv-dynamic-versioning"; + tag = "v${version}"; + # Tests perform mock operations on the local repo + leaveDotGit = true; + hash = "sha256-5pc05yazeHyQvmNk0uy6XkLrmX4ZQF6Lj7fDDtVcpu4="; + }; + + build-system = [ + hatchling + ]; + + dependencies = [ + dunamai + eval-type-backport + hatchling + pydantic + returns + tomlkit + ]; + + pythonImportsCheck = [ + "uv_dynamic_versioning" + ]; + + preCheck = '' + git config --global user.email "nobody@example.com" + git config --global user.name "Nobody" + ''; + + nativeCheckInputs = [ + gitpython + pytestCheckHook + writableTmpDirAsHomeHook + ]; + + meta = { + description = "Dynamic versioning based on VCS tags for uv/hatch project"; + homepage = "https://github.com/ninoseki/uv-dynamic-versioning"; + changelog = "https://github.com/ninoseki/uv-dynamic-versioning/releases/tag/v${version}"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ GaetanLepage ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index a51a956972de..829f8b8e475d 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -17776,6 +17776,8 @@ self: super: with self; { uv = callPackage ../development/python-modules/uv { }; + uv-dynamic-versioning = callPackage ../development/python-modules/uv-dynamic-versioning { }; + uvcclient = callPackage ../development/python-modules/uvcclient { }; uvicorn = callPackage ../development/python-modules/uvicorn { };