about summary refs log tree commit diff
path: root/pkgs/tools/security
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
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')
-rw-r--r--pkgs/tools/security/pinentry/default.nix40
-rw-r--r--pkgs/tools/security/pinentry/duplicate-glib-defs.patch20
-rw-r--r--pkgs/tools/security/polkit-gnome/default.nix22
-rw-r--r--pkgs/tools/security/polkit-kde-agent/default.nix16
4 files changed, 98 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)
diff --git a/pkgs/tools/security/polkit-gnome/default.nix b/pkgs/tools/security/polkit-gnome/default.nix
new file mode 100644
index 000000000000..9adab0fb0c27
--- /dev/null
+++ b/pkgs/tools/security/polkit-gnome/default.nix
@@ -0,0 +1,22 @@
+{ stdenv, fetchurl, pkgconfig, gtk, polkit, dbus_glib, intltool }:
+stdenv.mkDerivation rec {
+
+  name = "polkit-gnome-${version}";
+  version = "0.96";
+
+  src = fetchurl {
+    url = http://hal.freedesktop.org/releases/polkit-gnome-0.96.tar.bz2;
+    sha256 = "14la7j3h1k1s88amkcv8rzq9wmhgzypvxpwaxwg2x2k55l1wi5hd";
+  };
+
+  buildInputs = [ pkgconfig gtk polkit dbus_glib intltool ];
+
+  configureFlags = [ "--disable-introspection" ];
+
+  meta = with stdenv.lib; {
+    homepage = http://hal.freedesktop.org/docs/PolicyKit/;
+    description = "A dbus session bus service that is used to bring up authentication dialogs";
+    license = licenses.gpl2;
+    maintainers = [ maintainers.phreedom ];
+  };
+}
\ No newline at end of file
diff --git a/pkgs/tools/security/polkit-kde-agent/default.nix b/pkgs/tools/security/polkit-kde-agent/default.nix
new file mode 100644
index 000000000000..eff290f54fa8
--- /dev/null
+++ b/pkgs/tools/security/polkit-kde-agent/default.nix
@@ -0,0 +1,16 @@
+{ stdenv, fetchurl, kdelibs, polkit_qt_1, gettext }:
+
+stdenv.mkDerivation rec {
+  name = "polkit-kde-agent-1-0.99.0";
+
+  src = fetchurl {
+    url = "mirror://kde/stable/apps/KDE4.x/admin/${name}.tar.bz2";
+    sha256 = "0rxlq6x0vhvha8i6w109zpzzacp4imins55v4p4fq7a3k0kgywg3";
+  };
+
+  buildInputs = [ kdelibs polkit_qt_1 ];
+
+  buildNativeInputs = [ gettext ];
+
+  patchPhase = "sed -e s/KDE4_AUTOSTART/AUTOSTART/ -i CMakeLists.txt";
+}