diff options
author | Thomas Tuegel <ttuegel@mailbox.org> | 2019-07-24 16:07:40 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-24 16:07:40 -0500 |
commit | 294e75e832594cda1a25df817f7717adb9ed49b6 (patch) | |
tree | 293eeedd3014ae0ac88a8b3642a478db0311edae | |
parent | 5806e71834c636b57f7e5f7b84f52d162f158cf3 (diff) | |
parent | 9235a8eaeff094c8e014b669c2e447b6e161e815 (diff) | |
download | nixlib-294e75e832594cda1a25df817f7717adb9ed49b6.tar nixlib-294e75e832594cda1a25df817f7717adb9ed49b6.tar.gz nixlib-294e75e832594cda1a25df817f7717adb9ed49b6.tar.bz2 nixlib-294e75e832594cda1a25df817f7717adb9ed49b6.tar.lz nixlib-294e75e832594cda1a25df817f7717adb9ed49b6.tar.xz nixlib-294e75e832594cda1a25df817f7717adb9ed49b6.tar.zst nixlib-294e75e832594cda1a25df817f7717adb9ed49b6.zip |
Merge pull request #65339 from ttuegel/wrap-pinentry_qt5
pinentry: Use qt5.wrapQtApps as needed
-rw-r--r-- | nixos/modules/config/no-x-libs.nix | 2 | ||||
-rw-r--r-- | pkgs/tools/security/pinentry/default.nix | 22 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 8 |
3 files changed, 25 insertions, 7 deletions
diff --git a/nixos/modules/config/no-x-libs.nix b/nixos/modules/config/no-x-libs.nix index aad02a9ca4e3..74cf74d74181 100644 --- a/nixos/modules/config/no-x-libs.nix +++ b/nixos/modules/config/no-x-libs.nix @@ -34,7 +34,7 @@ with lib; networkmanager-openvpn = super.networkmanager-openvpn.override { withGnome = false; }; networkmanager-vpnc = super.networkmanager-vpnc.override { withGnome = false; }; networkmanager-iodine = super.networkmanager-iodine.override { withGnome = false; }; - pinentry = super.pinentry.override { gtk2 = null; gcr = null; qt = null; }; + pinentry = super.pinentry.override { gtk2 = null; gcr = null; qt4 = null; qt5 = null; }; gobject-introspection = super.gobject-introspection.override { x11Support = false; }; })); }; diff --git a/pkgs/tools/security/pinentry/default.nix b/pkgs/tools/security/pinentry/default.nix index ba7ef7a3cfdd..ac6a50960ad2 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}" diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index bf9c11c56154..0bf8f6f3eb51 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5318,6 +5318,8 @@ in pinentry = callPackage ../tools/security/pinentry { libcap = if stdenv.isDarwin then null else libcap; gcr = null; + qt4 = null; + qt5 = null; }; pinentry_ncurses = res.pinentry.override { @@ -5333,11 +5335,13 @@ in }; pinentry_qt4 = res.pinentry.override { - qt = qt4; + gtk2 = null; + inherit qt4; }; pinentry_qt5 = res.pinentry.override { - qt = qt5.qtbase; + gtk2 = null; + inherit qt5; }; pinentry_mac = callPackage ../tools/security/pinentry/mac.nix { |