1{ lib
2, buildPythonPackage
3, fetchPypi
4, pythonOlder
5, cached-property
6, packaging
7, pdm-backend
8, requests
9, flask
10, pytest-httpserver
11, pytestCheckHook
12, requests-wsgi-adapter
13, trustme
14}:
15
16buildPythonPackage rec {
17 pname = "unearth";
18 version = "0.12.1";
19 format = "pyproject";
20
21 disabled = pythonOlder "3.7";
22
23 src = fetchPypi {
24 inherit pname version;
25 hash = "sha256-TKrZQbYPUeUP3BCYZiNNQHkQrvd/EjOqG2tdFox0J+4=";
26 };
27
28 nativeBuildInputs = [
29 pdm-backend
30 ];
31
32 propagatedBuildInputs = [
33 packaging
34 requests
35 ] ++ lib.optionals (pythonOlder "3.8") [
36 cached-property
37 ];
38
39 __darwinAllowLocalNetworking = true;
40
41 nativeCheckInputs = [
42 flask
43 pytest-httpserver
44 pytestCheckHook
45 requests-wsgi-adapter
46 trustme
47 ];
48
49 pythonImportsCheck = [
50 "unearth"
51 ];
52
53 meta = with lib; {
54 description = "A utility to fetch and download Python packages";
55 homepage = "https://github.com/frostming/unearth";
56 changelog = "https://github.com/frostming/unearth/releases/tag/${version}";
57 license = licenses.mit;
58 maintainers = with maintainers; [ betaboon ];
59 };
60}