Merge pull request #27468 from jtojnar/fix/pinentry-gnome

pinentry: add GNOME frontend
This commit is contained in:
Graham Christensen 2017-10-02 07:29:23 -04:00 committed by GitHub
commit 5af263c2af
4 changed files with 23 additions and 15 deletions

@ -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; };
};
};
}

@ -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;

@ -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 ];

@ -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 {