about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorGraham Christensen <graham@grahamc.com>2017-10-02 07:29:23 -0400
committerGitHub <noreply@github.com>2017-10-02 07:29:23 -0400
commit5af263c2af4db18e2cc40d0940fad1ddd149fbc5 (patch)
treed79599b528178a877c5ffc09e4b3365160e04871 /pkgs
parentd8fe9476b7f98afc2790ef5c6bdd9d281d2bbad9 (diff)
parent3f7e3db74426f658b4625505d262c1f7b288606d (diff)
downloadnixlib-5af263c2af4db18e2cc40d0940fad1ddd149fbc5.tar
nixlib-5af263c2af4db18e2cc40d0940fad1ddd149fbc5.tar.gz
nixlib-5af263c2af4db18e2cc40d0940fad1ddd149fbc5.tar.bz2
nixlib-5af263c2af4db18e2cc40d0940fad1ddd149fbc5.tar.lz
nixlib-5af263c2af4db18e2cc40d0940fad1ddd149fbc5.tar.xz
nixlib-5af263c2af4db18e2cc40d0940fad1ddd149fbc5.tar.zst
nixlib-5af263c2af4db18e2cc40d0940fad1ddd149fbc5.zip
Merge pull request #27468 from jtojnar/fix/pinentry-gnome
pinentry: add GNOME frontend
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/desktops/gnome-3/core/gcr/default.nix10
-rw-r--r--pkgs/tools/security/pinentry/default.nix18
-rw-r--r--pkgs/top-level/all-packages.nix8
3 files changed, 22 insertions, 14 deletions
diff --git a/pkgs/desktops/gnome-3/core/gcr/default.nix b/pkgs/desktops/gnome-3/core/gcr/default.nix
index 0798d69f9e65..21b9d89e3c3b 100644
--- a/pkgs/desktops/gnome-3/core/gcr/default.nix
+++ b/pkgs/desktops/gnome-3/core/gcr/default.nix
@@ -7,12 +7,14 @@ stdenv.mkDerivation rec {
 
   outputs = [ "out" "dev" ];
 
-  buildInputs = [
-    pkgconfig intltool gnupg glib gobjectIntrospection libxslt
-    libgcrypt libtasn1 dbus_glib gtk pango gdk_pixbuf atk makeWrapper vala_0_32
+  buildInputs = let
+    gpg = gnupg.override { guiSupport = false; }; # prevent build cycle with pinentry_gnome
+  in [
+    pkgconfig intltool gpg gobjectIntrospection libxslt
+    libgcrypt libtasn1 dbus_glib pango gdk_pixbuf atk makeWrapper vala_0_32
   ];
 
-  propagatedBuildInputs = [ p11_kit ];
+  propagatedBuildInputs = [ glib gtk p11_kit ];
 
   #doCheck = true;
 
diff --git a/pkgs/tools/security/pinentry/default.nix b/pkgs/tools/security/pinentry/default.nix
index 667831373c55..0d957fc97e08 100644
--- a/pkgs/tools/security/pinentry/default.nix
+++ b/pkgs/tools/security/pinentry/default.nix
@@ -1,12 +1,11 @@
 { fetchurl, fetchpatch, stdenv, lib, pkgconfig
-, libgpgerror, libassuan, libcap ? null, ncurses ? null, gtk2 ? null, qt4 ? null
+, libgpgerror, libassuan, libcap ? null, libsecret ? null, ncurses ? null, gtk2 ? null, gcr ? null, qt4 ? null
 }:
 
 let
   mkFlag = pfxTrue: pfxFalse: cond: name: "--${if cond then pfxTrue else pfxFalse}-${name}";
   mkEnable = mkFlag "enable" "disable";
   mkWith = mkFlag "with" "without";
-  hasX = gtk2 != null || qt4 != null;
 in
 with stdenv.lib;
 stdenv.mkDerivation rec {
@@ -17,7 +16,7 @@ stdenv.mkDerivation rec {
     sha256 = "0ni7g4plq6x78p32al7m8h2zsakvg1rhfz0qbc3kdc7yq7nw4whn";
   };
 
-  buildInputs = [ libgpgerror libassuan libcap gtk2 ncurses qt4 ];
+  buildInputs = [ libgpgerror libassuan libcap libsecret gtk2 gcr ncurses qt4 ];
 
   prePatch = ''
     substituteInPlace pinentry/pinentry-curses.c --replace ncursesw ncurses
@@ -39,12 +38,13 @@ stdenv.mkDerivation rec {
   '';
 
   configureFlags = [
-    (mkWith   (libcap != null)  "libcap")
-    (mkWith   (hasX)            "x")
-    (mkEnable (ncurses != null) "pinentry-curses")
-    (mkEnable true              "pinentry-tty")
-    (mkEnable (gtk2 != null)    "pinentry-gtk2")
-    (mkEnable (qt4 != null)     "pinentry-qt4")
+    (mkWith   (libcap != null)    "libcap")
+    (mkEnable (libsecret != null) "libsecret")
+    (mkEnable (ncurses != null)   "pinentry-curses")
+    (mkEnable true                "pinentry-tty")
+    (mkEnable (gtk2 != null)      "pinentry-gtk2")
+    (mkEnable (gcr != null)       "pinentry-gnome3")
+    (mkEnable (qt4 != null)       "pinentry-qt")
   ];
 
   nativeBuildInputs = [ pkgconfig ];
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index bd28e1e435dd..1d3272d2dd8b 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -3869,10 +3869,16 @@ with pkgs;
   pinentry = callPackage ../tools/security/pinentry {
     libcap = if stdenv.isDarwin then null else libcap;
     qt4 = null;
+    gtk2 = null;
+    gcr = gnome3.gcr;
   };
 
   pinentry_ncurses = pinentry.override {
-    gtk2 = null;
+    gcr = null;
+  };
+
+  pinentry_gtk2 = pinentry_ncurses.override {
+    inherit gtk2;
   };
 
   pinentry_qt4 = pinentry_ncurses.override {