diff options
| author | Martin Weinelt <mweinelt@users.noreply.github.com> | 2022-05-04 23:58:48 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-05-04 23:58:48 +0200 |
| commit | 24bea0f3baad8c4c28ed69b6968b38b02f962076 (patch) | |
| tree | 6e18fce2d65fd5be425fc44b7ef0a472f6a8665f | |
| parent | Merge pull request #171510: [21.11] matrix-appservice-irc: update matrix-org-... (diff) | |
| parent | maintainers: add ofek (diff) | |
| download | nixpkgs-24bea0f3baad8c4c28ed69b6968b38b02f962076.tar.gz | |
Merge pull request #171576 from adisbladis/hatchling-backport
[Backport release-21.11] python3.pkgs.hatchling: init
| -rw-r--r-- | maintainers/maintainer-list.nix | 6 | ||||
| -rw-r--r-- | pkgs/development/python-modules/editables/default.nix | 4 | ||||
| -rw-r--r-- | pkgs/development/python-modules/hatchling/default.nix | 84 | ||||
| -rw-r--r-- | pkgs/top-level/python-packages.nix | 2 |
4 files changed, 94 insertions, 2 deletions
diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 6b8799c2177e..68b3bebfbfbe 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -8662,6 +8662,12 @@ githubId = 158758; name = "Oliver Dunkl"; }; + ofek = { + email = "oss@ofek.dev"; + github = "ofek"; + githubId = 9677399; + name = "Ofek Lev"; + }; offline = { email = "jaka@x-truder.net"; github = "offlinehacker"; diff --git a/pkgs/development/python-modules/editables/default.nix b/pkgs/development/python-modules/editables/default.nix index ee902d772c99..e5deb02af52f 100644 --- a/pkgs/development/python-modules/editables/default.nix +++ b/pkgs/development/python-modules/editables/default.nix @@ -6,11 +6,11 @@ buildPythonPackage rec { pname = "editables"; - version = "0.2"; + version = "0.3"; src = fetchPypi { inherit pname version; - sha256 = "6918f16225258f24ef9800c2327e14eded42ddac344e77982380749464024f35"; + sha256 = "sha256-FnUk43c1jtHxN05hwmjw16S/fb0EbGVve0EM3hYWGxo="; }; checkInputs = [ diff --git a/pkgs/development/python-modules/hatchling/default.nix b/pkgs/development/python-modules/hatchling/default.nix new file mode 100644 index 000000000000..4c7927bc9b31 --- /dev/null +++ b/pkgs/development/python-modules/hatchling/default.nix @@ -0,0 +1,84 @@ +{ 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.24.0"; +in +buildPythonPackage { + inherit pname version; + format = "pyproject"; + + src = fetchPypi { + inherit pname version; + hash = "sha256-zmdl9bW688tX0vgBlsUOIB43KMrNlTU/XJtPA9/fTrk="; + }; + + postPatch = '' + substituteInPlace ./src/hatchling/ouroboros.py --replace 'tomli>=1.2.2' 'tomli>=1.2.0' + substituteInPlace ./src/hatchling/ouroboros.py --replace 'packaging>=21.3' 'packaging>=20.9' + ''; + + # 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 ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 691cacc2f275..ceb79195a88f 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3497,6 +3497,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 { }; |
