python3Packages.hatchling: init at 0.18.0
This commit is contained in:
parent
f432820813
commit
ba276cf1e6
2 changed files with 86 additions and 0 deletions
84
pkgs/development/python-modules/hatchling/default.nix
Normal file
84
pkgs/development/python-modules/hatchling/default.nix
Normal file
|
@ -0,0 +1,84 @@
|
|||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, pythonOlder
|
||||
|
||||
# runtime
|
||||
, editables
|
||||
, importlib-metadata # < 3.8
|
||||
, packaging
|
||||
, pathspec
|
||||
, pluggy
|
||||
, tomli
|
||||
|
||||
# tests
|
||||
, build
|
||||
, python
|
||||
, requests
|
||||
, toml
|
||||
, virtualenv
|
||||
}:
|
||||
|
||||
let
|
||||
pname = "hatchling";
|
||||
version = "0.18.0";
|
||||
in
|
||||
buildPythonPackage {
|
||||
inherit pname version;
|
||||
format = "pyproject";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ofek";
|
||||
repo = "hatch";
|
||||
rev = "${pname}-v${version}";
|
||||
hash = "sha256-kCaEAM0cY1yQcuHfvnaLs3smN9MKATjrrQTXpCfGmWc=";
|
||||
};
|
||||
|
||||
prePatch = ''
|
||||
cd backend
|
||||
'';
|
||||
|
||||
# listed in backend/src/hatchling/ouroboros.py
|
||||
propagatedBuildInputs = [
|
||||
editables
|
||||
packaging
|
||||
pathspec
|
||||
pluggy
|
||||
tomli
|
||||
] ++ lib.optionals (pythonOlder "3.8") [
|
||||
importlib-metadata
|
||||
];
|
||||
|
||||
pythonImportsCheck = [
|
||||
"hatchling"
|
||||
];
|
||||
|
||||
# tries to fetch packages from the internet
|
||||
doCheck = false;
|
||||
|
||||
# listed in /backend/tests/downstream/requirements.txt
|
||||
checkInputs = [
|
||||
build
|
||||
packaging
|
||||
requests
|
||||
toml
|
||||
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://ofek.dev/hatch/latest/";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ hexa ];
|
||||
};
|
||||
}
|
|
@ -3692,6 +3692,8 @@ in {
|
|||
|
||||
hatasmota = callPackage ../development/python-modules/hatasmota { };
|
||||
|
||||
hatchling = callPackage ../development/python-modules/hatchling { };
|
||||
|
||||
haversine = callPackage ../development/python-modules/haversine { };
|
||||
|
||||
hawkauthlib = callPackage ../development/python-modules/hawkauthlib { };
|
||||
|
|
Loading…
Reference in a new issue