Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 6 # build-system 7 hatchling, 8 9 # dependencies 10 dunamai, 11 eval-type-backport, 12 jinja2, 13 pydantic, 14 returns, 15 tomlkit, 16 17 # tests 18 gitpython, 19 pytestCheckHook, 20 writableTmpDirAsHomeHook, 21}: 22 23buildPythonPackage rec { 24 pname = "uv-dynamic-versioning"; 25 version = "0.8.2"; 26 pyproject = true; 27 28 src = fetchFromGitHub { 29 owner = "ninoseki"; 30 repo = "uv-dynamic-versioning"; 31 tag = "v${version}"; 32 # Tests perform mock operations on the local repo 33 leaveDotGit = true; 34 hash = "sha256-iIWghJXhs0IblO7Kgfe6lEc0F/KYF1c8/TN5tkIvXa0="; 35 }; 36 37 build-system = [ 38 hatchling 39 ]; 40 41 dependencies = [ 42 dunamai 43 eval-type-backport 44 hatchling 45 jinja2 46 pydantic 47 returns 48 tomlkit 49 ]; 50 51 pythonImportsCheck = [ 52 "uv_dynamic_versioning" 53 ]; 54 55 preCheck = '' 56 git config --global user.email "nobody@example.com" 57 git config --global user.name "Nobody" 58 ''; 59 60 nativeCheckInputs = [ 61 gitpython 62 pytestCheckHook 63 writableTmpDirAsHomeHook 64 ]; 65 66 meta = { 67 description = "Dynamic versioning based on VCS tags for uv/hatch project"; 68 homepage = "https://github.com/ninoseki/uv-dynamic-versioning"; 69 changelog = "https://github.com/ninoseki/uv-dynamic-versioning/releases/tag/v${version}"; 70 license = lib.licenses.mit; 71 maintainers = with lib.maintainers; [ GaetanLepage ]; 72 }; 73}