about summary refs log tree commit diff
path: root/pkgs/development/python-modules/e3-core/default.nix
blob: ef0b31b177ab203e4fc68204e1b77376b2a446df (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
{ autoPatchelfHook
, buildPythonPackage
, colorama
, coverage
, distro
, fetchFromGitHub
, httpretty
, lib
, mock
, packaging
, psutil
, pytest
, pytest-socket
, python-dateutil
, pyyaml
, requests
, requests-cache
, requests-toolbelt
, stdenv
, setuptools
, stevedore
, tomlkit
, tox
, tqdm
, typeguard
}:

buildPythonPackage rec {
  pname = "e3-core";
  version = "22.4.0";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "AdaCore";
    repo = "e3-core";
    rev = "v${version}";
    hash = "sha256-dgEk2/qRfAYwUz+e5TWKUy/aPLpmyWZ32OV1i7QM9Fs=";
  };

  patches = [
    ./0001-use-distro-over-ld.patch
  ];

  nativeBuildInputs = [
    autoPatchelfHook
    setuptools
  ];

  propagatedBuildInputs = [
    colorama
    packaging
    pyyaml
    python-dateutil
    requests
    requests-cache
    requests-toolbelt
    tqdm
    stevedore
  ] ++ lib.optional stdenv.isLinux [
    # See setup.py:24. These are required only on Linux. Darwin has its own set
    # of requirements.
    psutil
    distro
  ];

  pythonImportsCheck = [ "e3" ];

  # e3-core is tested with tox; it's hard to test without internet.
  doCheck = false;

  meta = with lib; {
    changelog = "https://github.com/AdaCore/e3-core/releases/tag/${src.rev}";
    homepage = "https://github.com/AdaCore/e3-core/";
    description = "Core framework for developing portable automated build systems";
    license = licenses.gpl3Only;
    maintainers = with maintainers; [ atalii ];
    mainProgram = "e3";
    # See the comment regarding distro and psutil. Other platforms are supported
    # upstream, but not by this package.
    platforms = platforms.linux;
  };
}