diff --git a/nixos/modules/config/no-x-libs.nix b/nixos/modules/config/no-x-libs.nix index ae3e17ac27b6..ec3103b4a401 100644 --- a/nixos/modules/config/no-x-libs.nix +++ b/nixos/modules/config/no-x-libs.nix @@ -35,7 +35,7 @@ with lib; networkmanager_pptp = pkgs.networkmanager_pptp.override { withGnome = false; }; networkmanager_vpnc = pkgs.networkmanager_vpnc.override { withGnome = false; }; networkmanager_iodine = pkgs.networkmanager_iodine.override { withGnome = false; }; - pinentry = pkgs.pinentry.override { gtk2 = null; qt4 = null; }; + pinentry = pkgs.pinentry.override { gcr = null; gtk2 = null; qt4 = null; }; }; }; } 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 {