From 6d92197ffd34f9753f803abc538ca6323ece424b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Mon, 8 Dec 2008 21:22:20 +0000 Subject: [PATCH] Pinentry 0.7.5. svn path=/nixpkgs/trunk/; revision=13597 --- pkgs/tools/misc/pinentry/default.nix | 29 ++++++++++++------- .../misc/pinentry/duplicate-glib-defs.patch | 20 +++++++++++++ pkgs/top-level/all-packages.nix | 2 +- 3 files changed, 40 insertions(+), 11 deletions(-) create mode 100644 pkgs/tools/misc/pinentry/duplicate-glib-defs.patch diff --git a/pkgs/tools/misc/pinentry/default.nix b/pkgs/tools/misc/pinentry/default.nix index 4ee840069752..900370d0f8e4 100644 --- a/pkgs/tools/misc/pinentry/default.nix +++ b/pkgs/tools/misc/pinentry/default.nix @@ -1,17 +1,26 @@ -args: -args.stdenv.mkDerivation { - name = "pinentry-0.7.2"; +{ fetchurl, stdenv, glib, pkgconfig, gtk, ncurses }: - src = args.fetchurl { - url = http://gentoo.chem.wisc.edu/gentoo/distfiles/pinentry-0.7.2.tar.gz; - sha256 = "0s6n5n4bxg95rmwa3mw3r49dabf8yh6fkpfi8mbl7i85dgpibnzv"; +stdenv.mkDerivation rec { + name = "pinentry-0.7.5"; + + src = fetchurl { + url = "mirror://gnupg/pinentry/${name}.tar.gz"; + sha256 = "cb269ac058793b2df343a12a65e3402abc4b68503e105b12e4ca903d8d8e3172"; }; - buildInputs =(with args; [glib pkgconfig x11 gtk]); + patches = [ ./duplicate-glib-defs.patch ]; + + buildInputs = [ glib pkgconfig gtk ncurses ]; meta = { - description = "input interface for passwords needed by gnupg"; - homepage = "don't know, gentoo lists http://www.gnupg.org/aegypten/"; - license = "GPL2"; + 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/misc/pinentry/duplicate-glib-defs.patch b/pkgs/tools/misc/pinentry/duplicate-glib-defs.patch new file mode 100644 index 000000000000..78796ee2f53a --- /dev/null +++ b/pkgs/tools/misc/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) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index beaa73d43fc4..9774eec9cdba 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1084,7 +1084,7 @@ let }; pinentry = import ../tools/misc/pinentry { - inherit fetchurl stdenv pkgconfig x11; + inherit fetchurl stdenv pkgconfig ncurses; inherit (gnome) glib gtk; };