2022-04-15 01:41:22 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, pythonOlder
|
|
|
|
|
|
|
|
# runtime
|
|
|
|
, editables
|
|
|
|
, importlib-metadata # < 3.8
|
|
|
|
, packaging
|
|
|
|
, pathspec
|
|
|
|
, pluggy
|
|
|
|
, tomli
|
|
|
|
|
|
|
|
# tests
|
|
|
|
, build
|
|
|
|
, python
|
|
|
|
, requests
|
|
|
|
, virtualenv
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
pname = "hatchling";
|
2022-09-14 18:05:37 +00:00
|
|
|
version = "1.8.0";
|
2022-04-15 01:41:22 +00:00
|
|
|
in
|
|
|
|
buildPythonPackage {
|
|
|
|
inherit pname version;
|
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-09-14 18:05:37 +00:00
|
|
|
sha256 = "sha256-pPmC/coHF9jEa/57UBMC+QqvKlMChF1VC0nIc5aB/rI=";
|
2022-04-15 01:41:22 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
# listed in backend/src/hatchling/ouroboros.py
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
editables
|
|
|
|
packaging
|
|
|
|
pathspec
|
|
|
|
pluggy
|
|
|
|
] ++ lib.optionals (pythonOlder "3.8") [
|
|
|
|
importlib-metadata
|
2022-07-14 12:49:19 +00:00
|
|
|
] ++ lib.optionals (pythonOlder "3.11") [
|
|
|
|
tomli
|
2022-04-15 01:41:22 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
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";
|
2022-07-14 12:49:19 +00:00
|
|
|
homepage = "https://hatch.pypa.io/latest/";
|
2022-04-15 01:41:22 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ hexa ofek ];
|
|
|
|
};
|
|
|
|
}
|