From: Timotej Lazar <timotej.lazar@araneo.si>
To: 68984@debbugs.gnu.org
Cc: Timotej Lazar <timotej.lazar@araneo.si>
Subject: [bug#68984] [PATCH 2/2] gnu: qtpass: Switch to qt-build-system and new package style.
Date: Wed, 7 Feb 2024 22:23:34 +0100 [thread overview]
Message-ID: <6de9dbd1ac3cd0a8e8ec83e6a8b2af46c985e3e3.1707340157.git.timotej.lazar@araneo.si> (raw)
In-Reply-To: <cover.1707340157.git.timotej.lazar@araneo.si>
* gnu/packages/password-utils.scm (qtpass): Use qt-build-system.
[arguments]: Drop 'wrap-qt and 'check-setup phases. Drop the unnecessary
'reset-resource-timestamps phase. Use new package style for remaining phases.
[inputs]: Drop qtbase-5.
Change-Id: I23a0b8dfd1fdfeca343704d3df084c522b319d30
---
gnu/packages/password-utils.scm | 79 +++++++++++----------------------
1 file changed, 26 insertions(+), 53 deletions(-)
diff --git a/gnu/packages/password-utils.scm b/gnu/packages/password-utils.scm
index 0f88fab2d9..1547acf1be 100644
--- a/gnu/packages/password-utils.scm
+++ b/gnu/packages/password-utils.scm
@@ -862,63 +862,36 @@ (define-public qtpass
(file-name (git-file-name name version))
(sha256
(base32 "10ixahm4ap0l1rrz4cyswblm22ns9z1baf5lv3dn23wprfdcp8m0"))))
- (build-system gnu-build-system)
+ (build-system qt-build-system)
(arguments
- `(#:modules ((guix build gnu-build-system)
- (guix build qt-utils)
- (guix build utils))
- #:imported-modules (,@%gnu-build-system-modules
- (guix build qt-utils))
- #:phases
- (modify-phases %standard-phases
- (replace 'configure
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out")))
- ;; lupdate/lrelease need to find qmake.
- (setenv "QMAKE" "qmake")
- ;; qmake needs to find lrelease/lupdate.
- (invoke "qmake"
- "QMAKE_LRELEASE=lrelease"
- "QMAKE_LUPDATE=lupdate"
- (string-append "PREFIX=" out)))))
- (add-after 'configure 'reset-resource-timestamps
- ;; Reset timestamps on localization files for a reproducible build.
- (lambda _
- (with-directory-excursion "localization"
- (for-each (lambda (file)
- (let* ((base (basename file ".qm"))
- (src (string-append base ".ts"))
- (st (stat src)))
- (set-file-time file st)))
- (find-files "." ".*\\.qm")))
- #t))
- (add-after 'install 'install-auxilliary
- ;; Install man-page, icon and .desktop file.
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (applications (string-append out "/share/applications"))
- (icons (string-append out "/share/icons/hicolor/scalable/apps"))
- (man (string-append out "/share/man/man1")))
- (install-file "qtpass.desktop" applications)
- (install-file "artwork/icon.svg" icons)
- (rename-file (string-append icons "/icon.svg")
- (string-append icons "/qtpass-icon.svg"))
- (install-file "qtpass.1" man)
- #t)))
- (add-after 'install 'wrap-qt
- (lambda* (#:key outputs inputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out")))
- (wrap-qt-program "qtpass" #:output out #:inputs inputs))
- #t))
- (add-before 'check 'check-setup
- ;; Make Qt render "offscreen", required for tests.
- (lambda _
- (setenv "QT_QPA_PLATFORM" "offscreen")
- #t)))))
+ (list
+ #:test-target "check"
+ #:phases
+ #~(modify-phases %standard-phases
+ (replace 'configure
+ (lambda _
+ (invoke "qmake"
+ "QMAKE_LRELEASE=lrelease"
+ "QMAKE_LUPDATE=lupdate"
+ (string-append "PREFIX=" #$output))))
+ (add-before 'check 'pre-check
+ ;; Fontconfig needs a writable cache.
+ (lambda _ (setenv "HOME" "/tmp")))
+ (add-after 'install 'install-auxilliary
+ ;; Install man-page, icon and .desktop file.
+ (lambda _
+ (let ((applications (string-append #$output "/share/applications"))
+ (icons (string-append #$output "/share/icons/hicolor/scalable/apps"))
+ (man (string-append #$output "/share/man/man1")))
+ (install-file "qtpass.desktop" applications)
+ (install-file "artwork/icon.svg" icons)
+ (rename-file (string-append icons "/icon.svg")
+ (string-append icons "/qtpass-icon.svg"))
+ (install-file "qtpass.1" man)))))))
(native-inputs
(list qttools-5))
(inputs
- (list qtbase-5 qtsvg-5))
+ (list qtsvg-5))
(home-page "https://qtpass.org")
(synopsis "GUI for password manager password-store")
(description
--
2.41.0
next prev parent reply other threads:[~2024-02-07 21:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-07 21:17 [bug#68984] [PATCH 0/2] Update qtpass Timotej Lazar
2024-02-07 21:23 ` [bug#68984] [PATCH 1/2] gnu: qtpass: Update to 1.4.0 Timotej Lazar
2024-02-07 21:23 ` Timotej Lazar [this message]
2024-02-13 12:24 ` [bug#68984] [PATCH 0/2] Update qtpass Christopher Baines
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6de9dbd1ac3cd0a8e8ec83e6a8b2af46c985e3e3.1707340157.git.timotej.lazar@araneo.si \
--to=timotej.lazar@araneo.si \
--cc=68984@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.