about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/security/gpgstats/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/tools/security/gpgstats/default.nix')
-rw-r--r--nixpkgs/pkgs/tools/security/gpgstats/default.nix33
1 files changed, 33 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/tools/security/gpgstats/default.nix b/nixpkgs/pkgs/tools/security/gpgstats/default.nix
new file mode 100644
index 000000000000..c095b77129cc
--- /dev/null
+++ b/nixpkgs/pkgs/tools/security/gpgstats/default.nix
@@ -0,0 +1,33 @@
+{ stdenv, fetchurl, ncurses, gpgme }:
+
+stdenv.mkDerivation rec {
+  name = "gpgstats-${version}";
+  version = "0.5";
+
+  src = fetchurl {
+    url = "https://www.vanheusden.com/gpgstats/${name}.tgz";
+    sha256 = "1n3njqhjwgfllcxs0xmk89dzgirrpfpfzkj71kqyvq97gc1wbcxy";
+  };
+
+  buildInputs = [ ncurses gpgme ];
+
+  installPhase = ''
+    mkdir -p $out/bin
+    cp gpgstats $out/bin
+  '';
+
+  NIX_CFLAGS_COMPILE = stdenv.lib.optionals (!stdenv.is64bit)
+    [ "-D_FILE_OFFSET_BITS=64" "-DLARGEFILE_SOURCE=1" ];
+
+  meta = with stdenv.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;
+  };
+}
+