1{
2 lib,
3 stdenv,
4 autoPatchelfHook,
5 buildPythonPackage,
6 colorama,
7 distro,
8 fetchFromGitHub,
9 packaging,
10 psutil,
11 python-dateutil,
12 pythonOlder,
13 pyyaml,
14 requests-cache,
15 requests-toolbelt,
16 requests,
17 setuptools,
18 stevedore,
19 tqdm,
20}:
21
22buildPythonPackage rec {
23 pname = "e3-core";
24 version = "22.6.0";
25 pyproject = true;
26
27 disabled = pythonOlder "3.6";
28
29 src = fetchFromGitHub {
30 owner = "AdaCore";
31 repo = "e3-core";
32 tag = "v${version}";
33 hash = "sha256-6rClGDo8KhBbOg/Rw0nVISVtOAACf5cwSafNInlBGCw=";
34 };
35
36 build-system = [ setuptools ];
37
38 nativeBuildInputs = [ autoPatchelfHook ];
39
40 dependencies = [
41 colorama
42 packaging
43 python-dateutil
44 pyyaml
45 requests
46 requests-cache
47 requests-toolbelt
48 stevedore
49 tqdm
50 ]
51 ++ lib.optional stdenv.hostPlatform.isLinux [
52 # See https://github.com/AdaCore/e3-core/blob/v22.6.0/pyproject.toml#L37-L42
53 # These are required only on Linux. Darwin has its own set of requirements
54 psutil
55 distro
56 ];
57
58 pythonImportsCheck = [ "e3" ];
59
60 # e3-core is tested with tox; it's hard to test without internet.
61 doCheck = false;
62
63 meta = with lib; {
64 changelog = "https://github.com/AdaCore/e3-core/releases/tag/v${version}";
65 homepage = "https://github.com/AdaCore/e3-core/";
66 description = "Core framework for developing portable automated build systems";
67 license = licenses.gpl3Only;
68 maintainers = with maintainers; [ atalii ];
69 mainProgram = "e3";
70 # See the comment regarding distro and psutil. Other platforms are supported
71 # upstream, but not by this package.
72 platforms = platforms.linux;
73 };
74}