@@ -1,4 +1,4 @@
1−{ stdenv, fetchurl, fetchFromGitHub, python3, python3Packages, zbar, secp256k1
1+{ stdenv, fetchurl, fetchFromGitHub, wrapQtAppsHook, python3, python3Packages, zbar, secp256k1
22, enableQt ? !stdenv.isDarwin
33
44
@@ -54,6 +54,8 @@ python3Packages.buildPythonApplication rec {
5454 cp -ar ${tests} $sourceRoot/electrum/tests
5555 '';
5656
57+ nativeBuildInputs = stdenv.lib.optionals enableQt [ wrapQtAppsHook ];
58+
5759 propagatedBuildInputs = with python3Packages; [
5860 aiorpcx
5961 aiohttp
@@ -102,6 +104,11 @@ python3Packages.buildPythonApplication rec {
102104 "Exec=$out/bin/electrum %u" \
103105 --replace 'Exec=sh -c "PATH=\"\\$HOME/.local/bin:\\$PATH\"; electrum --testnet %u"' \
104106 "Exec=$out/bin/electrum --testnet %u"
107+
108+ '';
109+
110+ postFixup = stdenv.lib.optionalString enableQt ''
111+ wrapQtApp $out/bin/electrum
105112 '';
106113
107114 checkInputs = with python3Packages; [ pytest ];