Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 4 fetchPypi, 5 pythonOlder, 6 7 # runtime 8 editables, 9 packaging, 10 pathspec, 11 pluggy, 12 tomli, 13 trove-classifiers, 14 15 # tests 16 build, 17 python, 18 requests, 19 virtualenv, 20}: 21 22buildPythonPackage rec { 23 pname = "hatchling"; 24 version = "1.25.0"; 25 format = "pyproject"; 26 disabled = pythonOlder "3.8"; 27 28 src = fetchPypi { 29 inherit pname version; 30 hash = "sha256-cGRjGlEmELUiUKTT/xvYFVHW0UMcTre3LnNN9sdPQmI="; 31 }; 32 33 # listed in backend/pyproject.toml 34 propagatedBuildInputs = [ 35 editables 36 packaging 37 pathspec 38 pluggy 39 trove-classifiers 40 ] ++ lib.optionals (pythonOlder "3.11") [ tomli ]; 41 42 pythonImportsCheck = [ 43 "hatchling" 44 "hatchling.build" 45 ]; 46 47 # tries to fetch packages from the internet 48 doCheck = false; 49 50 # listed in /backend/tests/downstream/requirements.txt 51 nativeCheckInputs = [ 52 build 53 requests 54 virtualenv 55 ]; 56 57 preCheck = '' 58 export HOME=$TMPDIR 59 ''; 60 61 checkPhase = '' 62 runHook preCheck 63 ${python.interpreter} tests/downstream/integrate.py 64 runHook postCheck 65 ''; 66 67 meta = with lib; { 68 description = "Modern, extensible Python build backend"; 69 mainProgram = "hatchling"; 70 homepage = "https://hatch.pypa.io/latest/"; 71 changelog = "https://github.com/pypa/hatch/releases/tag/hatchling-v${version}"; 72 license = licenses.mit; 73 maintainers = with maintainers; [ 74 hexa 75 ofek 76 ]; 77 }; 78}