perlPackages.NetAsyncWebSocket: 0.13 -> 0.14 (#352432)
[NixPkgs.git] / pkgs / development / python-modules / hatchling / default.nix
blob069cd5374b4c365f6a6995bca3eaa4a482076562
2   lib,
3   buildPythonPackage,
4   fetchPypi,
5   pythonOlder,
7   # runtime
8   editables,
9   packaging,
10   pathspec,
11   pluggy,
12   tomli,
13   trove-classifiers,
15   # tests
16   build,
17   python,
18   requests,
19   virtualenv,
22 buildPythonPackage rec {
23   pname = "hatchling";
24   version = "1.25.0";
25   format = "pyproject";
26   disabled = pythonOlder "3.8";
28   src = fetchPypi {
29     inherit pname version;
30     hash = "sha256-cGRjGlEmELUiUKTT/xvYFVHW0UMcTre3LnNN9sdPQmI=";
31   };
33   # listed in backend/pyproject.toml
34   propagatedBuildInputs = [
35     editables
36     packaging
37     pathspec
38     pluggy
39     trove-classifiers
40   ] ++ lib.optionals (pythonOlder "3.11") [ tomli ];
42   pythonImportsCheck = [
43     "hatchling"
44     "hatchling.build"
45   ];
47   # tries to fetch packages from the internet
48   doCheck = false;
50   # listed in /backend/tests/downstream/requirements.txt
51   nativeCheckInputs = [
52     build
53     requests
54     virtualenv
55   ];
57   preCheck = ''
58     export HOME=$TMPDIR
59   '';
61   checkPhase = ''
62     runHook preCheck
63     ${python.interpreter} tests/downstream/integrate.py
64     runHook postCheck
65   '';
67   meta = with lib; {
68     description = "Modern, extensible Python build backend";
69     mainProgram = "hatchling";
70     homepage = "https://hatch.pypa.io/latest/";
71     changelog = "https://github.com/pypa/hatch/releases/tag/hatchling-v${version}";
72     license = licenses.mit;
73     maintainers = with maintainers; [
74       hexa
75       ofek
76     ];
77   };