nixpkgs/pkgs/development/python-modules/hatchling/default.nix
Sandro Jäckel a020d64376 python310Packages.hatchling: 0.13.0 -> 0.18.0
required because jsonschema using a new classifier 0.13.0 does not know

Changelog: https://github.com/pypa/hatch/releases
2023-07-28 12:13:27 +02:00

76 lines
1.3 KiB
Nix

{ lib
, buildPythonPackage
, fetchPypi
, pythonOlder
# runtime
, editables
, packaging
, pathspec
, pluggy
, tomli
, trove-classifiers
# tests
, build
, python
, requests
, virtualenv
}:
buildPythonPackage rec {
pname = "hatchling";
version = "1.18.0";
format = "pyproject";
disabled = pythonOlder "3.8";
src = fetchPypi {
inherit pname version;
hash = "sha256-UOmcMRDOCvw/e9ut/xxxwXdY5HZzHCdgeUDPpmhkico=";
};
# listed in backend/pyproject.toml
propagatedBuildInputs = [
editables
packaging
pathspec
pluggy
trove-classifiers
] ++ lib.optionals (pythonOlder "3.11") [
tomli
];
pythonImportsCheck = [
"hatchling"
"hatchling.build"
];
# tries to fetch packages from the internet
doCheck = false;
# listed in /backend/tests/downstream/requirements.txt
nativeCheckInputs = [
build
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";
homepage = "https://hatch.pypa.io/latest/";
changelog = "https://github.com/pypa/hatch/releases/tag/hatchling-v${version}";
license = licenses.mit;
maintainers = with maintainers; [ hexa ofek ];
};
}