pinentry: Use qt5.wrapQtApps as needed
This commit is contained in:
parent
6b7c72105e
commit
b40550232f
@ -1,9 +1,21 @@
|
|||||||
{ fetchurl, fetchpatch, stdenv, lib, pkgconfig
|
{ fetchurl, fetchpatch, stdenv, lib, pkgconfig
|
||||||
, libgpgerror, libassuan, libcap ? null, libsecret ? null, ncurses ? null, gtk2 ? null, gcr ? null, qt ? null
|
, libgpgerror, libassuan
|
||||||
|
, libcap ? null, libsecret ? null, ncurses ? null, gtk2 ? null, gcr ? null
|
||||||
|
, qt4 ? null, qt5 ? null
|
||||||
, enableEmacs ? false
|
, enableEmacs ? false
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
assert qt5 != null -> qt4 == null;
|
||||||
|
assert qt4 != null -> qt5 == null;
|
||||||
|
|
||||||
|
let
|
||||||
|
mkDerivation =
|
||||||
|
if qt5 != null
|
||||||
|
then qt5.mkDerivation
|
||||||
|
else stdenv.mkDerivation;
|
||||||
|
in
|
||||||
|
|
||||||
|
mkDerivation rec {
|
||||||
name = "pinentry-1.1.0";
|
name = "pinentry-1.1.0";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
@ -12,7 +24,9 @@ stdenv.mkDerivation rec {
|
|||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ pkgconfig ];
|
nativeBuildInputs = [ pkgconfig ];
|
||||||
buildInputs = [ libgpgerror libassuan libcap libsecret gtk2 gcr ncurses qt ];
|
buildInputs =
|
||||||
|
[ libgpgerror libassuan libcap libsecret gtk2 gcr ncurses qt4 ]
|
||||||
|
++ stdenv.lib.optional (qt5 != null) qt5.qtbase;
|
||||||
|
|
||||||
prePatch = ''
|
prePatch = ''
|
||||||
substituteInPlace pinentry/pinentry-curses.c --replace ncursesw ncurses
|
substituteInPlace pinentry/pinentry-curses.c --replace ncursesw ncurses
|
||||||
@ -34,7 +48,7 @@ stdenv.mkDerivation rec {
|
|||||||
(stdenv.lib.enableFeature enableEmacs "pinentry-emacs")
|
(stdenv.lib.enableFeature enableEmacs "pinentry-emacs")
|
||||||
(stdenv.lib.enableFeature (gtk2 != null) "pinentry-gtk2")
|
(stdenv.lib.enableFeature (gtk2 != null) "pinentry-gtk2")
|
||||||
(stdenv.lib.enableFeature (gcr != null) "pinentry-gnome3")
|
(stdenv.lib.enableFeature (gcr != null) "pinentry-gnome3")
|
||||||
(stdenv.lib.enableFeature (qt != null) "pinentry-qt")
|
(stdenv.lib.enableFeature (qt4 != null || qt5 != null) "pinentry-qt")
|
||||||
|
|
||||||
"--with-libassuan-prefix=${libassuan.dev}"
|
"--with-libassuan-prefix=${libassuan.dev}"
|
||||||
"--with-libgpg-error-prefix=${libgpgerror.dev}"
|
"--with-libgpg-error-prefix=${libgpgerror.dev}"
|
||||||
|
@ -5318,6 +5318,8 @@ in
|
|||||||
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;
|
||||||
gcr = null;
|
gcr = null;
|
||||||
|
qt4 = null;
|
||||||
|
qt5 = null;
|
||||||
};
|
};
|
||||||
|
|
||||||
pinentry_ncurses = res.pinentry.override {
|
pinentry_ncurses = res.pinentry.override {
|
||||||
@ -5333,11 +5335,13 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
pinentry_qt4 = res.pinentry.override {
|
pinentry_qt4 = res.pinentry.override {
|
||||||
qt = qt4;
|
gtk2 = null;
|
||||||
|
inherit qt4;
|
||||||
};
|
};
|
||||||
|
|
||||||
pinentry_qt5 = res.pinentry.override {
|
pinentry_qt5 = res.pinentry.override {
|
||||||
qt = qt5.qtbase;
|
gtk2 = null;
|
||||||
|
inherit qt5;
|
||||||
};
|
};
|
||||||
|
|
||||||
pinentry_mac = callPackage ../tools/security/pinentry/mac.nix {
|
pinentry_mac = callPackage ../tools/security/pinentry/mac.nix {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user