diff options
author | Thomas Tuegel <thomas.tuegel@runtimeverification.com> | 2019-07-24 11:26:16 -0500 |
---|---|---|
committer | Thomas Tuegel <thomas.tuegel@runtimeverification.com> | 2019-07-24 11:30:47 -0500 |
commit | b40550232f1aec34de71b45d6562e6f73e6f6368 (patch) | |
tree | 79de28a208a7881119b00b9e1bac04594bca7c35 /pkgs/tools/security/pinentry | |
parent | 6b7c72105e3ce0bfbca0b57769f678a1b5c88ad1 (diff) |
pinentry: Use qt5.wrapQtApps as needed
Diffstat (limited to 'pkgs/tools/security/pinentry')
-rw-r--r-- | pkgs/tools/security/pinentry/default.nix | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/pkgs/tools/security/pinentry/default.nix b/pkgs/tools/security/pinentry/default.nix index ba7ef7a3cfdd6..ac6a50960ad2a 100644 --- a/pkgs/tools/security/pinentry/default.nix +++ b/pkgs/tools/security/pinentry/default.nix @@ -1,9 +1,21 @@ { 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 }: -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"; src = fetchurl { @@ -12,7 +24,9 @@ stdenv.mkDerivation rec { }; 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 = '' substituteInPlace pinentry/pinentry-curses.c --replace ncursesw ncurses @@ -34,7 +48,7 @@ stdenv.mkDerivation rec { (stdenv.lib.enableFeature enableEmacs "pinentry-emacs") (stdenv.lib.enableFeature (gtk2 != null) "pinentry-gtk2") (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-libgpg-error-prefix=${libgpgerror.dev}" |