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-07-14 12:49:19 +00:00
|
|
|
version = "1.0.0";
|
2022-04-15 01:41:22 +00:00
|
|
|
in
|
|
|
|
buildPythonPackage {
|
|
|
|
inherit pname version;
|
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-07-14 12:49:19 +00:00
|
|
|
sha256 = "d235a5fa8aff89e8d9d6d4033594aa4c3bc00ec5e31d3e80c153bfcf951b4f98";
|
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 ];
|
|
|
|
};
|
|
|
|
}
|