gnu: keepassxc: Set QT_PLUGIN_PATH.
authorJulien Lepiller <julien@lepiller.eu>
Thu, 16 Jul 2020 21:54:58 +0000 (23:54 +0200)
committerJulien Lepiller <julien@lepiller.eu>
Thu, 16 Jul 2020 22:10:47 +0000 (00:10 +0200)
* gnu/packages/password-utils.scm (keepassxc): Wrap program to set
QT_PLUGIN_PATH for svg icons to show properly.

gnu/packages/password-utils.scm

index 0dffffd..ee4d088 100644 (file)
@@ -133,7 +133,19 @@ human.")
     (build-system cmake-build-system)
     (arguments
      '(#:configure-flags '("-DWITH_XC_ALL=YES"
-                           "-DWITH_XC_UPDATECHECK=NO")))
+                           "-DWITH_XC_UPDATECHECK=NO")
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'install 'wrap-bin
+           (lambda* (#:key outputs inputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               (wrap-program (string-append out "/bin/keepassxc")
+                 `("QT_PLUGIN_PATH" ":" prefix
+                   ,(map (lambda (label)
+                           (string-append (assoc-ref inputs label)
+                                          "/lib/qt5/plugins"))
+                         '("qtbase" "qtsvg")))))
+             #t)))))
     (native-inputs
      `(("asciidoctor" ,ruby-asciidoctor)
        ("qttools" ,qttools)))