about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/tern/default.nix
blob: e00e06561f02ff8687d1d6f3aba8fd4ffe0d07e0 (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
{ lib
, buildPythonPackage
, fetchPypi
, pyyaml
, docker
, dockerfile-parse
, requests
, stevedore
, pbr
, debian-inspector
, regex
, GitPython
, prettytable
, idna
}:
buildPythonPackage rec {
  pname = "tern";
  version = "2.6.1";

  src = fetchPypi {
    inherit pname version;
    sha256 = "749c18ef493ebe3ac28624b2b26c6e38f77de2afd6a6579d2c92393d8fbdbd46";
  };

  patches = [
    # debut was renamed to debian-inspector
    # https://github.com/tern-tools/tern/pull/962
    # NOTE: Has to be in-tree because the upstream patch doesn't apply cleanly
    # to the PyPi source.
    ./0001-Replace-debut-with-debian-inspector.patch
  ];

  preBuild = ''
    cp requirements.{in,txt}
  '';

  nativeBuildInputs = [
    pbr
  ];

  propagatedBuildInputs = [
    pyyaml
    docker
    dockerfile-parse
    requests
    stevedore
    debian-inspector
    regex
    GitPython
    prettytable
    idna
  ];

  # No tests
  doCheck = false;

  pythonImportsCheck = [
    "tern"
  ];

  meta = with lib; {
    description = "A software composition analysis tool and Python library that generates a Software Bill of Materials for container images and Dockerfiles";
    homepage = "https://github.com/tern-tools/tern";
    license = licenses.bsd2;
    maintainers = teams.determinatesystems.members;
  };
}