3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/python-modules/hatchling/default.nix
Ofek Lev 7bb5b6ce9c
python310Packages.hatchling: 0.25.0 -> 1.0.0 (#173450)
Co-authored-by: Robert Schütz <github@dotlambda.de>
2022-06-10 14:10:32 +02:00

79 lines
1.3 KiB
Nix

{ lib
, buildPythonPackage
, fetchPypi
, pythonOlder
# runtime
, editables
, importlib-metadata # < 3.8
, packaging
, pathspec
, pluggy
, tomli
# tests
, build
, python
, requests
, virtualenv
}:
let
pname = "hatchling";
version = "1.0.0";
in
buildPythonPackage {
inherit pname version;
format = "pyproject";
src = fetchPypi {
inherit pname version;
sha256 = "d235a5fa8aff89e8d9d6d4033594aa4c3bc00ec5e31d3e80c153bfcf951b4f98";
};
# listed in backend/src/hatchling/ouroboros.py
propagatedBuildInputs = [
editables
packaging
pathspec
pluggy
] ++ lib.optionals (pythonOlder "3.8") [
importlib-metadata
] ++ lib.optionals (pythonOlder "3.11") [
tomli
];
pythonImportsCheck = [
"hatchling"
"hatchling.build"
];
# tries to fetch packages from the internet
doCheck = false;
# listed in /backend/tests/downstream/requirements.txt
checkInputs = [
build
packaging
requests
virtualenv
];
preCheck = ''
export HOME=$TMPDIR
'';
checkPhase = ''
runHook preCheck
${python.interpreter} tests/downstream/integrate.py
runHook postCheck
'';
meta = with lib; {
description = "Modern, extensible Python build backend";
homepage = "https://hatch.pypa.io/latest/";
license = licenses.mit;
maintainers = with maintainers; [ hexa ofek ];
};
}