From 0466e94091803a2b67dd710e0a6b6becf5074e7c Mon Sep 17 00:00:00 2001 From: "Yury G. Kudryashov" Date: Thu, 18 Aug 2011 12:52:50 +0000 Subject: Add polkit-kde-agent Move pinentry and polkit-gnome to tools/security. svn path=/nixpkgs/trunk/; revision=28656 --- pkgs/tools/security/pinentry/default.nix | 40 ++++++++++++++++++++++ .../security/pinentry/duplicate-glib-defs.patch | 20 +++++++++++ 2 files changed, 60 insertions(+) create mode 100644 pkgs/tools/security/pinentry/default.nix create mode 100644 pkgs/tools/security/pinentry/duplicate-glib-defs.patch (limited to 'pkgs/tools/security/pinentry') 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) -- cgit 1.4.1