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 format = "pyproject"; 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 nativeBuildInputs = [ hatchling ]; 26 27 propagatedBuildInputs = [ 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 ] ++ lib.optionals (pythonOlder "3.11") [ 42 # https://github.com/pypa/setuptools_scm/issues/1038, fixed in setuptools_scm@8.1.0 43 "test_basic" 44 "test_root" 45 "test_metadata" 46 ]; 47 48 pythonImportsCheck = [ "hatch_vcs" ]; 49 50 meta = with lib; { 51 changelog = "https://github.com/ofek/hatch-vcs/releases/tag/v${version}"; 52 description = "Plugin for Hatch that uses your preferred version control system (like Git) to determine project versions"; 53 homepage = "https://github.com/ofek/hatch-vcs"; 54 license = licenses.mit; 55 maintainers = with maintainers; [ cpcloud ]; 56 }; 57}