aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2018-07-30 09:43:15 +0300
committerEfraim Flashner <efraim@flashner.co.il>2018-07-30 09:50:37 +0300
commit6915d20f05363f61cef9c4ed7ebda3fe5a19325d (patch)
tree1388f175d7dfa49c1dea8f34fd49ff9405e59a99
parent0c85d2c62dd0d439ff87f243c0885e5b207bee85 (diff)
downloadguix-6915d20f05363f61cef9c4ed7ebda3fe5a19325d.tar
guix-6915d20f05363f61cef9c4ed7ebda3fe5a19325d.tar.gz
gnu: monero-gui: Build with modular qt.
* gnu/packages/finance.scm (monero-gui)[inputs]: Remove qt, add qtbase, qtdeclarative, qtgraphicaleffects, qtquickcontrols. [native-inputs]: Add qttools. [arguments]: Add a custom phase to patch the absolute file-name of lrelease and lupdate. Add a custom phase to wrap the executable with QT environmental variables.
-rw-r--r--gnu/packages/finance.scm35
1 files changed, 32 insertions, 3 deletions
diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm
index 69209e9a63..fd2a5af0cb 100644
--- a/gnu/packages/finance.scm
+++ b/gnu/packages/finance.scm
@@ -478,12 +478,16 @@ Monero command line client and daemon.")
(native-inputs
`(("doxygen" ,doxygen)
("graphviz" ,graphviz)
- ("pkg-config" ,pkg-config)))
+ ("pkg-config" ,pkg-config)
+ ("qttools" ,qttools)))
(inputs
`(("boost" ,boost)
("libunwind" ,libunwind)
("openssl" ,openssl)
- ("qt" ,qt)
+ ("qtbase" ,qtbase)
+ ("qtdeclarative" ,qtdeclarative)
+ ("qtgraphicaleffects" ,qtgraphicaleffects)
+ ("qtquickcontrols" ,qtquickcontrols)
("readline" ,readline)
("unbound" ,unbound)))
(propagated-inputs
@@ -518,6 +522,15 @@ Monero command line client and daemon.")
(string-append "\""(assoc-ref inputs "monero")
"/bin/monerod")))
#t))
+ (add-after 'fix-monerod-path 'fix-qt-paths
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let* ((qttools (assoc-ref inputs "qttools"))
+ (lrelease (string-append qttools "/bin/lrelease"))
+ (lupdate (string-append qttools "/bin/lupdate")))
+ (substitute* "monero-wallet-gui.pro"
+ (("\\$\\$\\[QT_INSTALL_BINS\\]/lrelease") lrelease)
+ (("\\$\\$\\[QT_INSTALL_BINS\\]/lupdate") lupdate))
+ #t)))
(replace 'build
(lambda _
(invoke "./build.sh")))
@@ -529,7 +542,23 @@ Monero command line client and daemon.")
#t))
(add-before 'install 'change-dir
(lambda _
- (chdir "build"))))))
+ (chdir "build")))
+ (add-after 'install 'wrap-executable
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (wrap-program (string-append out "/bin/monero-wallet-gui")
+ `("QT_PLUGIN_PATH" ":" prefix
+ ,(map (lambda (label)
+ (string-append (assoc-ref inputs label)
+ "/lib/qt5/plugins"))
+ '("qtbase" "qtdeclarative")))
+ `("QML2_IMPORT_PATH" ":" prefix
+ ,(map (lambda (label)
+ (string-append (assoc-ref inputs label)
+ "/lib/qt5/qml"))
+ '("qtdeclarative" "qtgraphicaleffects"
+ "qtquickcontrols"))))
+ #t))))))
(home-page "https://getmonero.org/")
(synopsis "Graphical user interface for the Monero currency")
(description