summary refs log tree commit diff
path: root/pkgs/tools/package-management/auditwheel/default.nix
blob: b53ebff9c55c9209abc1619cf21b4390001d3bfa (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
{ lib
, bzip2
, patchelf
, python3
, gnutar
, unzip
}:

python3.pkgs.buildPythonApplication rec {
  pname = "auditwheel";
  version = "5.1.2";
  format = "setuptools";

  src = python3.pkgs.fetchPypi {
    inherit pname version;
    hash = "sha256-PuWDABSTHqhK9c0GXGN7ZhTvoD2biL2Pv8kk5+0B1ro=";
  };

  nativeBuildInputs = with python3.pkgs; [
    pbr
  ];

  propagatedBuildInputs = with python3.pkgs; [
    pyelftools
    setuptools
  ];

  checkInputs = with python3.pkgs; [
    pretend
    pytestCheckHook
  ];

  # Integration tests require docker and networking
  disabledTestPaths = [
    "tests/integration"
  ];

  # Ensure that there are no undeclared deps
  postCheck = ''
    PATH= PYTHONPATH= $out/bin/auditwheel --version > /dev/null
  '';

  makeWrapperArgs = [
    "--prefix" "PATH" ":" (lib.makeBinPath [ bzip2 gnutar patchelf unzip ])
  ];

  meta = with lib; {
    description = "Auditing and relabeling cross-distribution Linux wheels";
    homepage = "https://github.com/pypa/auditwheel";
    license = with licenses; [
      mit  # auditwheel and nibabel
      bsd2  # from https://github.com/matthew-brett/delocate
      bsd3  # from https://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-projects/pax-utils/lddtree.py
    ];
    maintainers = with maintainers; [ davhau ];
    platforms = platforms.linux;
  };
}