summary refs log tree commit diff
path: root/pkgs/applications/altcoins
diff options
context:
space:
mode:
authorThomas Tuegel <ttuegel@mailbox.org>2019-07-05 14:38:10 -0500
committerGitHub <noreply@github.com>2019-07-05 14:38:10 -0500
commit56d5963382da1b4848615aa9139e527978c64670 (patch)
tree6e76232d7b4fd5cf3034eef18f0e109f2b86bbb0 /pkgs/applications/altcoins
parent066491c2e18d6277e0765a3647068c93650fcd19 (diff)
parent3adc9d04870605ca20969a98fe820535fc7a88a5 (diff)
downloadnixpkgs-56d5963382da1b4848615aa9139e527978c64670.tar
nixpkgs-56d5963382da1b4848615aa9139e527978c64670.tar.gz
nixpkgs-56d5963382da1b4848615aa9139e527978c64670.tar.bz2
nixpkgs-56d5963382da1b4848615aa9139e527978c64670.tar.lz
nixpkgs-56d5963382da1b4848615aa9139e527978c64670.tar.xz
nixpkgs-56d5963382da1b4848615aa9139e527978c64670.tar.zst
nixpkgs-56d5963382da1b4848615aa9139e527978c64670.zip
Merge pull request #54525 from ttuegel/feature/qt-5/wrap-qt-apps
Wrap Qt applications
Diffstat (limited to 'pkgs/applications/altcoins')
-rw-r--r--pkgs/applications/altcoins/bitcoin.nix15
-rw-r--r--pkgs/applications/altcoins/monero-gui/default.nix11
2 files changed, 12 insertions, 14 deletions
diff --git a/pkgs/applications/altcoins/bitcoin.nix b/pkgs/applications/altcoins/bitcoin.nix
index d1802f774f2..ce0a31dfe68 100644
--- a/pkgs/applications/altcoins/bitcoin.nix
+++ b/pkgs/applications/altcoins/bitcoin.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchurl, pkgconfig, autoreconfHook, openssl, db48, boost, zeromq, rapidcheck
-, zlib, miniupnpc, qtbase ? null, qttools ? null, utillinux, protobuf, python3, qrencode, libevent
+, zlib, miniupnpc, qtbase ? null, qttools ? null, wrapQtAppsHook ? null, utillinux, protobuf, python3, qrencode, libevent
 , withGui }:
 
 with stdenv.lib;
@@ -14,7 +14,9 @@ stdenv.mkDerivation rec{
     sha256 = "5e4e6890e07b620a93fdb24605dae2bb53e8435b2a93d37558e1db1913df405f";
   };
 
-  nativeBuildInputs = [ pkgconfig autoreconfHook ];
+  nativeBuildInputs =
+    [ pkgconfig autoreconfHook ]
+    ++ optional withGui wrapQtAppsHook;
   buildInputs = [ openssl db48 boost zlib zeromq
                   miniupnpc protobuf libevent]
                   ++ optionals stdenv.isLinux [ utillinux ]
@@ -34,10 +36,11 @@ stdenv.mkDerivation rec{
 
   doCheck = true;
 
-  # QT_PLUGIN_PATH needs to be set when executing QT, which is needed when testing Bitcoin's GUI.
-  # See also https://github.com/NixOS/nixpkgs/issues/24256
-  checkFlags = optionals withGui [ "QT_PLUGIN_PATH=${qtbase}/lib/qt-5.${versions.minor qtbase.version}/plugins" ]
-    ++ [ "LC_ALL=C.UTF-8" ];
+  checkFlags =
+    [ "LC_ALL=C.UTF-8" ]
+    # QT_PLUGIN_PATH needs to be set when executing QT, which is needed when testing Bitcoin's GUI.
+    # See also https://github.com/NixOS/nixpkgs/issues/24256
+    ++ optional withGui "QT_PLUGIN_PATH=${qtbase}/${qtbase.qtPluginPrefix}";
 
   enableParallelBuilding = true;
 
diff --git a/pkgs/applications/altcoins/monero-gui/default.nix b/pkgs/applications/altcoins/monero-gui/default.nix
index f597d6b6527..986dd2b9e5d 100644
--- a/pkgs/applications/altcoins/monero-gui/default.nix
+++ b/pkgs/applications/altcoins/monero-gui/default.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchFromGitHub
-, makeWrapper, makeDesktopItem
+, wrapQtAppsHook, makeDesktopItem
 , qtbase, qmake, qtmultimedia, qttools
 , qtgraphicaleffects, qtdeclarative
 , qtlocation, qtquickcontrols, qtquickcontrols2
@@ -34,7 +34,7 @@ stdenv.mkDerivation rec {
     sha256 = "1l4kx2vidr7bpds43jdbwyaz0q1dy7sricpz061ff1fkappbxdh8";
   };
 
-  nativeBuildInputs = [ qmake pkgconfig ];
+  nativeBuildInputs = [ qmake pkgconfig wrapQtAppsHook ];
 
   buildInputs = [
     qtbase qtmultimedia qtgraphicaleffects
@@ -43,7 +43,7 @@ stdenv.mkDerivation rec {
     qtwebchannel qtwebengine qtx11extras
     qtxmlpatterns monero unbound readline
     boost libunwind libsodium pcsclite zeromq
-    cppzmq makeWrapper hidapi
+    cppzmq hidapi
   ];
 
   patches = [
@@ -94,11 +94,6 @@ stdenv.mkDerivation rec {
       cp $src/images/appicons/$size.png \
          $out/share/icons/hicolor/$size/apps/monero.png
     done;
-
-    # wrap runtime dependencies
-    wrapProgram $out/bin/monero-wallet-gui \
-      --set QML2_IMPORT_PATH "${qml2ImportPath}" \
-      --set QT_PLUGIN_PATH "${qtbase.bin}/${qtbase.qtPluginPrefix}"
   '';
 
   meta = {