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-11-21 17:40:18 +00:00
|
|
|
version = "1.11.1";
|
2022-04-15 01:41:22 +00:00
|
|
|
in
|
|
|
|
buildPythonPackage {
|
|
|
|
inherit pname version;
|
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-11-21 17:40:18 +00:00
|
|
|
hash = "sha256-n4Q2H3DPOnq5VDsMPsxkIR7SuopganHrakc8HJsI4dA=";
|
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
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-04-15 01:41:22 +00:00
|
|
|
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-11-21 17:40:18 +00:00
|
|
|
changelog = "https://github.com/pypa/hatch/blob/hatchling-v${version}/docs/history.md#hatchling";
|
2022-04-15 01:41:22 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ hexa ofek ];
|
|
|
|
};
|
|
|
|
}
|