pinentry: add GNOME 3 frontend support
This commit is contained in:
parent
adbba9d5f6
commit
4ad98786a0
@ -1,12 +1,12 @@
|
|||||||
{ fetchurl, fetchpatch, stdenv, lib, pkgconfig
|
{ fetchurl, fetchpatch, stdenv, lib, pkgconfig
|
||||||
, libgpgerror, libassuan, libcap ? null, ncurses ? null, gtk2 ? null, qt4 ? null
|
, libgpgerror, libassuan, libcap ? 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;
|
hasX = gtk2 != null || gcr != null || qt4 != null;
|
||||||
in
|
in
|
||||||
with stdenv.lib;
|
with stdenv.lib;
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
|
|||||||
sha256 = "0ni7g4plq6x78p32al7m8h2zsakvg1rhfz0qbc3kdc7yq7nw4whn";
|
sha256 = "0ni7g4plq6x78p32al7m8h2zsakvg1rhfz0qbc3kdc7yq7nw4whn";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ libgpgerror libassuan libcap gtk2 ncurses qt4 ];
|
buildInputs = [ libgpgerror libassuan libcap gtk2 gcr ncurses qt4 ];
|
||||||
|
|
||||||
prePatch = ''
|
prePatch = ''
|
||||||
substituteInPlace pinentry/pinentry-curses.c --replace ncursesw ncurses
|
substituteInPlace pinentry/pinentry-curses.c --replace ncursesw ncurses
|
||||||
@ -44,6 +44,7 @@ stdenv.mkDerivation rec {
|
|||||||
(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 (gcr != null) "pinentry-gnome3")
|
||||||
(mkEnable (qt4 != null) "pinentry-qt4")
|
(mkEnable (qt4 != null) "pinentry-qt4")
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -3866,6 +3866,10 @@ with pkgs;
|
|||||||
gtk2 = null;
|
gtk2 = null;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
pinentry_gnome = pinentry_ncurses.override {
|
||||||
|
gcr = gnome3.gcr;
|
||||||
|
};
|
||||||
|
|
||||||
pinentry_qt4 = pinentry_ncurses.override {
|
pinentry_qt4 = pinentry_ncurses.override {
|
||||||
inherit qt4;
|
inherit qt4;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user