about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/security/gpgstats/default.nix
blob: f6f6d367810961771f2e46605cf488b54c6b56f7 (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
{ lib, stdenv, fetchurl, ncurses, gpgme }:

stdenv.mkDerivation rec {
  pname = "gpgstats";
  version = "0.5";

  src = fetchurl {
    url = "https://www.vanheusden.com/gpgstats/${pname}-${version}.tgz";
    sha256 = "1n3njqhjwgfllcxs0xmk89dzgirrpfpfzkj71kqyvq97gc1wbcxy";
  };

  buildInputs = [ ncurses gpgme ];

  installPhase = ''
    mkdir -p $out/bin
    cp gpgstats $out/bin
  '';

  NIX_CFLAGS_COMPILE = lib.optionalString (!stdenv.is64bit)
    "-D_FILE_OFFSET_BITS=64 -DLARGEFILE_SOURCE=1";

  meta = with lib; {
    description = "Calculates statistics on the keys in your gpg key-ring";
    longDescription = ''
    GPGstats calculates statistics on the keys in your key-ring.
    '';
    homepage = "http://www.vanheusden.com/gpgstats/";
    license = licenses.gpl2;
    maintainers = with maintainers; [ davidak ];
    platforms = platforms.unix;
  };
}