Merge pull request #27468 from jtojnar/fix/pinentry-gnome
pinentry: add GNOME frontend
This commit is contained in:
commit
5af263c2af
|
@ -35,7 +35,7 @@ with lib;
|
||||||
networkmanager_pptp = pkgs.networkmanager_pptp.override { withGnome = false; };
|
networkmanager_pptp = pkgs.networkmanager_pptp.override { withGnome = false; };
|
||||||
networkmanager_vpnc = pkgs.networkmanager_vpnc.override { withGnome = false; };
|
networkmanager_vpnc = pkgs.networkmanager_vpnc.override { withGnome = false; };
|
||||||
networkmanager_iodine = pkgs.networkmanager_iodine.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" ];
|
outputs = [ "out" "dev" ];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = let
|
||||||
pkgconfig intltool gnupg glib gobjectIntrospection libxslt
|
gpg = gnupg.override { guiSupport = false; }; # prevent build cycle with pinentry_gnome
|
||||||
libgcrypt libtasn1 dbus_glib gtk pango gdk_pixbuf atk makeWrapper vala_0_32
|
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;
|
#doCheck = true;
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,11 @@
|
||||||
{ fetchurl, fetchpatch, stdenv, lib, pkgconfig
|
{ 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
|
let
|
||||||
mkFlag = pfxTrue: pfxFalse: cond: name: "--${if cond then pfxTrue else pfxFalse}-${name}";
|
mkFlag = pfxTrue: pfxFalse: cond: name: "--${if cond then pfxTrue else pfxFalse}-${name}";
|
||||||
mkEnable = mkFlag "enable" "disable";
|
mkEnable = mkFlag "enable" "disable";
|
||||||
mkWith = mkFlag "with" "without";
|
mkWith = mkFlag "with" "without";
|
||||||
hasX = gtk2 != null || qt4 != null;
|
|
||||||
in
|
in
|
||||||
with stdenv.lib;
|
with stdenv.lib;
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
|
@ -17,7 +16,7 @@ stdenv.mkDerivation rec {
|
||||||
sha256 = "0ni7g4plq6x78p32al7m8h2zsakvg1rhfz0qbc3kdc7yq7nw4whn";
|
sha256 = "0ni7g4plq6x78p32al7m8h2zsakvg1rhfz0qbc3kdc7yq7nw4whn";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ libgpgerror libassuan libcap gtk2 ncurses qt4 ];
|
buildInputs = [ libgpgerror libassuan libcap libsecret gtk2 gcr ncurses qt4 ];
|
||||||
|
|
||||||
prePatch = ''
|
prePatch = ''
|
||||||
substituteInPlace pinentry/pinentry-curses.c --replace ncursesw ncurses
|
substituteInPlace pinentry/pinentry-curses.c --replace ncursesw ncurses
|
||||||
|
@ -40,11 +39,12 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
configureFlags = [
|
configureFlags = [
|
||||||
(mkWith (libcap != null) "libcap")
|
(mkWith (libcap != null) "libcap")
|
||||||
(mkWith (hasX) "x")
|
(mkEnable (libsecret != null) "libsecret")
|
||||||
(mkEnable (ncurses != null) "pinentry-curses")
|
(mkEnable (ncurses != null) "pinentry-curses")
|
||||||
(mkEnable true "pinentry-tty")
|
(mkEnable true "pinentry-tty")
|
||||||
(mkEnable (gtk2 != null) "pinentry-gtk2")
|
(mkEnable (gtk2 != null) "pinentry-gtk2")
|
||||||
(mkEnable (qt4 != null) "pinentry-qt4")
|
(mkEnable (gcr != null) "pinentry-gnome3")
|
||||||
|
(mkEnable (qt4 != null) "pinentry-qt")
|
||||||
];
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [ pkgconfig ];
|
nativeBuildInputs = [ pkgconfig ];
|
||||||
|
|
|
@ -3869,10 +3869,16 @@ with pkgs;
|
||||||
pinentry = callPackage ../tools/security/pinentry {
|
pinentry = callPackage ../tools/security/pinentry {
|
||||||
libcap = if stdenv.isDarwin then null else libcap;
|
libcap = if stdenv.isDarwin then null else libcap;
|
||||||
qt4 = null;
|
qt4 = null;
|
||||||
|
gtk2 = null;
|
||||||
|
gcr = gnome3.gcr;
|
||||||
};
|
};
|
||||||
|
|
||||||
pinentry_ncurses = pinentry.override {
|
pinentry_ncurses = pinentry.override {
|
||||||
gtk2 = null;
|
gcr = null;
|
||||||
|
};
|
||||||
|
|
||||||
|
pinentry_gtk2 = pinentry_ncurses.override {
|
||||||
|
inherit gtk2;
|
||||||
};
|
};
|
||||||
|
|
||||||
pinentry_qt4 = pinentry_ncurses.override {
|
pinentry_qt4 = pinentry_ncurses.override {
|
||||||
|
|
Loading…
Reference in New Issue