about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/package-management/nvd/default.nix
blob: 8f33b4a5fbfa571b3f27ee098d0c43f3b6c2e19f (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
{ fetchFromGitLab
, installShellFiles
, lib
, python3
, stdenv
}:

stdenv.mkDerivation (finalAttrs: {
  pname = "nvd";
  version = "0.2.3";

  src = fetchFromGitLab {
    owner = "khumba";
    repo = "nvd";
    rev = "refs/tags/v${finalAttrs.version}";
    hash = "sha256-TmaXsyJLRkmIN9D77jOXd8fLj7kYPCBLg0AHIImAtgA=";
  };

  buildInputs = [
    python3
  ];

  nativeBuildInputs = [
    installShellFiles
  ];

  installPhase = ''
    runHook preInstall
    install -m555 -Dt $out/bin src/nvd
    installManPage src/nvd.1
    runHook postInstall
  '';

  meta = {
    description = "Nix/NixOS package version diff tool";
    homepage = "https://gitlab.com/khumba/nvd";
    license = lib.licenses.asl20;
    mainProgram = "nvd";
    maintainers = with lib.maintainers; [ khumba ];
    platforms = lib.platforms.all;
  };
})