Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 4 fetchPypi, 5 pytestCheckHook, 6 pythonOlder, 7 git, 8 hatchling, 9 setuptools-scm, 10}: 11 12buildPythonPackage rec { 13 pname = "hatch-vcs"; 14 version = "0.4.0"; 15 pyproject = true; 16 17 disabled = pythonOlder "3.8"; 18 19 src = fetchPypi { 20 pname = "hatch_vcs"; 21 inherit version; 22 hash = "sha256-CTgQdI/gHbDUUfq88sGsJojK79Iy1O3pZwkLHBsH2fc="; 23 }; 24 25 build-system = [ hatchling ]; 26 27 dependencies = [ 28 hatchling 29 setuptools-scm 30 ]; 31 32 nativeCheckInputs = [ 33 git 34 pytestCheckHook 35 ]; 36 37 disabledTests = [ 38 # incompatible with setuptools-scm>=7 39 # https://github.com/ofek/hatch-vcs/issues/8 40 "test_write" 41 ] 42 ++ lib.optionals (pythonOlder "3.11") [ 43 # https://github.com/pypa/setuptools_scm/issues/1038, fixed in setuptools_scm@8.1.0 44 "test_basic" 45 "test_root" 46 "test_metadata" 47 ]; 48 49 pythonImportsCheck = [ "hatch_vcs" ]; 50 51 meta = with lib; { 52 changelog = "https://github.com/ofek/hatch-vcs/releases/tag/v${version}"; 53 description = "Plugin for Hatch that uses your preferred version control system (like Git) to determine project versions"; 54 homepage = "https://github.com/ofek/hatch-vcs"; 55 license = licenses.mit; 56 maintainers = with maintainers; [ cpcloud ]; 57 }; 58}