about summary refs log tree commit diff
path: root/pkgs/by-name/an/ansible-cmdb/package.nix
blob: f23da79053c644f3996ddd5cc88fb500fb7130e9 (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
{
  lib,
  fetchFromGitHub,
  substituteAll,
  python3Packages,
  testers,
  ansible-cmdb,
}:
let
  inherit (python3Packages)
    setuptools
    mako
    pyyaml
    jsonxs
    buildPythonApplication
    ;

  pname = "ansible-cmdb";
  version = "1.31";
in
buildPythonApplication {
  inherit pname version;

  pyproject = true;

  src = fetchFromGitHub {
    owner = "fboender";
    repo = "ansible-cmdb";
    rev = version;
    hash = "sha256-HOFLX8fiid+xJOVYNyVbz5FunrhteAUPlvS3ctclVHo=";
  };

  patches = [
    (substituteAll {
      src = ./setup.patch;
      inherit version;
    })
  ];

  build-system = [ setuptools ];

  dependencies = [
    mako
    pyyaml
    jsonxs
  ];

  passthru.tests.version = testers.testVersion {
    package = ansible-cmdb;
    version = "v${version}";
  };

  meta = {
    description = "Generate host overview from ansible fact gathering output";
    homepage = "https://github.com/fboender/ansible-cmdb";
    license = lib.licenses.gpl3Only;
    maintainers = [ lib.maintainers.tie ];
    mainProgram = "ansible-cmdb";
  };
}