Archived
1
0
Fork 0

gnu: nheko: Fix build.

* gnu/packages/messaging.scm (nheko)[arguments]: Use G-expressions.
This commit is contained in:
Nicolas Goaziou 2022-01-22 01:08:24 +01:00
parent 98a322e02e
commit f997af9c6f
No known key found for this signature in database
GPG key ID: DA00B4F048E92F2D

View file

@ -2349,43 +2349,43 @@ for the Matrix protocol. It is built on to of @code{Boost.Asio}.")
'(begin '(begin
(delete-file-recursively "third_party"))))) (delete-file-recursively "third_party")))))
(arguments (arguments
`(#:tests? #f ;no test target (list
#:configure-flags #:tests? #f ;no test target
'("-DCMAKE_BUILD_TYPE=Release" #:configure-flags
"-DBUILD_DOCS=ON" #~(list "-DCMAKE_BUILD_TYPE=Release"
;; Fix required because we are using a static SingleApplication "-DBUILD_DOCS=ON"
"-DCMAKE_CXX_FLAGS= \"-DQAPPLICATION_CLASS=QApplication\" " ;; Fix required because we are using a static SingleApplication
;; Compile Qml will make Nheko faster, but you will need to recompile "-DCMAKE_CXX_FLAGS= \"-DQAPPLICATION_CLASS=QApplication\" "
;; it, when you update Qt. That's fine for us. ;; Compile Qml will make Nheko faster, but you will need to recompile
"-DCOMPILE_QML=ON") ;; it, when you update Qt. That's fine for us.
#:phases "-DCOMPILE_QML=ON")
(modify-phases %standard-phases #:phases
(add-after 'unpack 'unbundle-dependencies #~(modify-phases %standard-phases
(lambda* (#:key inputs #:allow-other-keys) (add-after 'unpack 'unbundle-dependencies
(let ((single-app (assoc-ref inputs "single-application"))) (lambda _
(substitute* "CMakeLists.txt" (let ((single-app #$(this-package-input "single-application-qt5")))
;; Remove include and source dirs,replace with the correct one (substitute* "CMakeLists.txt"
(("third_party/blurhash/blurhash.cpp") "") ;; Remove include and source dirs,replace with the correct one
(("third_party/cpp-httplib-0.5.12") (("third_party/blurhash/blurhash.cpp") "")
(string-append "\"" single-app "/include\"")) (("third_party/cpp-httplib-0.5.12")
(("add_subdirectory.*third_party/SingleApplication.*") "") (string-append "\"" single-app "/include\""))
;; Link using the correct static/shared libs (("add_subdirectory.*third_party/SingleApplication.*") "")
(("SingleApplication::SingleApplication") ;; Link using the correct static/shared libs
(string-append (("SingleApplication::SingleApplication")
;; Dynamic libraries (string-append
"httplib" "\n" "blurhash" "\n" ;; Dynamic libraries
;; Static library "httplib" "\n" "blurhash" "\n"
single-app "/lib/libSingleApplication.a")))))) ;; Static library
(add-after 'unpack 'fix-determinism single-app "/lib/libSingleApplication.a"))))))
(lambda _ (add-after 'unpack 'fix-determinism
;; Make Qt deterministic. (lambda _
(setenv "QT_RCC_SOURCE_DATE_OVERRIDE" "1"))) ;; Make Qt deterministic.
(add-after 'install 'wrap-program (setenv "QT_RCC_SOURCE_DATE_OVERRIDE" "1")))
(lambda* (#:key inputs outputs #:allow-other-keys) (add-after 'install 'wrap-program
(let ((out (assoc-ref outputs "out")) (lambda _
(gst-plugin-path (getenv "GST_PLUGIN_SYSTEM_PATH"))) (let ((gst-plugin-path (getenv "GST_PLUGIN_SYSTEM_PATH")))
(wrap-program (string-append out "/bin/nheko") (wrap-program (string-append #$output "/bin/nheko")
`("GST_PLUGIN_SYSTEM_PATH" ":" prefix (,gst-plugin-path))))))))) `("GST_PLUGIN_SYSTEM_PATH" ":" prefix (,gst-plugin-path)))))))))
(build-system qt-build-system) (build-system qt-build-system)
(inputs (inputs
(list boost (list boost
@ -2395,11 +2395,11 @@ for the Matrix protocol. It is built on to of @code{Boost.Asio}.")
coeurl coeurl
curl curl
gst-plugins-base gst-plugins-base
gst-plugins-bad ; sdp & webrtc for voip gst-plugins-bad ; sdp & webrtc for voip
gst-plugins-good ; rtpmanager for voip gst-plugins-good ; rtpmanager for voip
json-modern-cxx json-modern-cxx
libevent libevent
libnice ; for voip libnice ; for voip
libolm libolm
lmdb lmdb
lmdbxx lmdbxx