Files
nixpkgs/pkgs/development/python-modules/hatchling/default.nix
T
Martin Weinelt 455f910e03 python3Packages.hatchling: 0.20.0 -> 0.20.1
Switches to the PyPi source per the upstream maintainers request in
https://github.com/NixOS/nixpkgs/pull/163088#issuecomment-1060748447
2022-03-14 00:29:07 +01:00

80 lines
1.3 KiB
Nix

{ lib
, buildPythonPackage
, fetchPypi
, pythonOlder
# runtime
, editables
, importlib-metadata # < 3.8
, packaging
, pathspec
, pluggy
, tomli
# tests
, build
, python
, requests
, toml
, virtualenv
}:
let
pname = "hatchling";
version = "0.20.1";
in
buildPythonPackage {
inherit pname version;
format = "pyproject";
src = fetchPypi {
inherit pname version;
hash = "sha256-l1VRce5H3CSAwZBeuxRyy7bNpOM6zX5s2L1/DXPo/Bg=";
};
# listed in backend/src/hatchling/ouroboros.py
propagatedBuildInputs = [
editables
packaging
pathspec
pluggy
tomli
] ++ lib.optionals (pythonOlder "3.8") [
importlib-metadata
];
pythonImportsCheck = [
"hatchling"
"hatchling.build"
];
# 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 ofek ];
};
}