summary refs log tree commit diff
path: root/pkgs/tools/security/pinentry
diff options
context:
space:
mode:
authorYury G. Kudryashov <urkud.urkud@gmail.com>2011-08-18 12:52:50 +0000
committerYury G. Kudryashov <urkud.urkud@gmail.com>2011-08-18 12:52:50 +0000
commit0466e94091803a2b67dd710e0a6b6becf5074e7c (patch)
tree68875f3e09a09814edc12dfd63327928df918203 /pkgs/tools/security/pinentry
parent0b669505c265c3d61a269d108a15e99989fb5c06 (diff)
downloadnixlib-0466e94091803a2b67dd710e0a6b6becf5074e7c.tar
nixlib-0466e94091803a2b67dd710e0a6b6becf5074e7c.tar.gz
nixlib-0466e94091803a2b67dd710e0a6b6becf5074e7c.tar.bz2
nixlib-0466e94091803a2b67dd710e0a6b6becf5074e7c.tar.lz
nixlib-0466e94091803a2b67dd710e0a6b6becf5074e7c.tar.xz
nixlib-0466e94091803a2b67dd710e0a6b6becf5074e7c.tar.zst
nixlib-0466e94091803a2b67dd710e0a6b6becf5074e7c.zip
Add polkit-kde-agent
Move pinentry and polkit-gnome to tools/security.

svn path=/nixpkgs/trunk/; revision=28656
Diffstat (limited to 'pkgs/tools/security/pinentry')
-rw-r--r--pkgs/tools/security/pinentry/default.nix40
-rw-r--r--pkgs/tools/security/pinentry/duplicate-glib-defs.patch20
2 files changed, 60 insertions, 0 deletions
diff --git a/pkgs/tools/security/pinentry/default.nix b/pkgs/tools/security/pinentry/default.nix
new file mode 100644
index 000000000000..524a582fcb02
--- /dev/null
+++ b/pkgs/tools/security/pinentry/default.nix
@@ -0,0 +1,40 @@
+{ fetchurl, stdenv, pkgconfig, glib
+, useGtk ? true, gtk
+, useNcurses ? true, ncurses
+, useQt4 ? false, qt4 }:
+
+assert useGtk || useNcurses || useQt4;
+
+stdenv.mkDerivation rec {
+  name = "pinentry-0.8.0";
+
+  src = fetchurl {
+    url = "mirror://gnupg/pinentry/${name}.tar.gz";
+    sha256 = "06phs3gbs6gf0z9g28z3jgsw312dhhpdgzrx4hhps53xrbwpyv22";
+  };
+
+  buildInputs = let opt = stdenv.lib.optional; in []
+    ++ opt useGtk glib
+    ++ opt useGtk gtk
+    ++ opt useNcurses ncurses
+    ++ opt useQt4 qt4;
+
+  configureFlags = [ "--disable-pinentry-gtk" "--disable-pinentry-qt" ]
+    ++ (if useGtk || useQt4 then ["--with-x"] else ["--without-x"])
+    ++ (if useGtk then ["--enable-pinentry-gtk2"] else ["--disable-pinentry-gtk"])
+    ++ (if useQt4 then ["--enable-pinentry-qt4"] else ["--disable-pinentry-qt4"]);
+
+  buildNativeInputs = [ pkgconfig ];
+
+  meta = {
+    description = "GnuPG's interface to passphrase input";
+
+    longDescription = ''
+      Pinentry provides a console and a GTK+ GUI that allows users to
+      enter a passphrase when `gpg' or `gpg2' is run and needs it.
+    '';
+
+    homepage = http://gnupg.org/aegypten2/;
+    license = "GPLv2+";
+  };
+}
diff --git a/pkgs/tools/security/pinentry/duplicate-glib-defs.patch b/pkgs/tools/security/pinentry/duplicate-glib-defs.patch
new file mode 100644
index 000000000000..78796ee2f53a
--- /dev/null
+++ b/pkgs/tools/security/pinentry/duplicate-glib-defs.patch
@@ -0,0 +1,20 @@
+Comment out definitions of functions that are part of Glib.
+
+--- pinentry-0.7.5/gtk+-2/gtksecentry.c	2007-11-19 12:20:50.000000000 +0100
++++ pinentry-0.7.5/gtk+-2/gtksecentry.c	2008-12-08 22:08:22.000000000 +0100
+@@ -269,6 +269,7 @@ gboolean g_use_secure_mem = FALSE;
+ 				} while(0)
+ 
+ 
++#if 0
+ gpointer
+ g_malloc(gulong size)
+ {
+@@ -347,6 +348,7 @@ g_free(gpointer mem)
+ 	    free(mem);
+     }
+ }
++#endif
+ 
+ GType
+ gtk_secure_entry_get_type(void)