unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: "Jens Mølgaard" <jens@zete.tk>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 36303@debbugs.gnu.org
Subject: [bug#36303] [PATCH] gnu: Add qtpass.
Date: Wed, 03 Jul 2019 21:29:23 +1200	[thread overview]
Message-ID: <87o92bbh58.fsf@zete.tk> (raw)
In-Reply-To: <871rz85b5h.fsf@gnu.org>


[-- Attachment #1.1: Type: text/plain, Size: 626 bytes --]

Hello Ludo,

> Some packages have a pre-check phase that spawns Xvfb; others do:
>   (setenv "QT_QPA_PLATFORM" "offscreen")
> Would one of these method allow us to run the tests?

Yep, tests work fine with this!

> Source file headers don’t specify any version of the GPL, so it should
> be ‘gpl3+’ (meaning “or any later version”).

Ah, I thought only compatible later versions could be used, unless it
was specified explicitly. I'll trust your advice and specify 'gpl3+'.

I've also added a bit to install the desktop file, man-page and icon.

So, patch should be good to go!

Thanks,
Jens M


[-- Attachment #1.2: 0001-gnu-Add-qtpass.patch --]
[-- Type: text/x-patch, Size: 4357 bytes --]

From 9aa91d33b280197dbd590e8347260e213df623c7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jens=20M=C3=B8lgaard?= <jens@zete.tk>
Date: Thu, 20 Jun 2019 19:24:47 +1200
Subject: [PATCH] gnu: Add qtpass.

* gnu/packages/password-utils.scm (qtpass): New variable.
---
 gnu/packages/password-utils.scm | 73 +++++++++++++++++++++++++++++++++
 1 file changed, 73 insertions(+)

diff --git a/gnu/packages/password-utils.scm b/gnu/packages/password-utils.scm
index ed890f73c3..e1c8a10242 100644
--- a/gnu/packages/password-utils.scm
+++ b/gnu/packages/password-utils.scm
@@ -22,6 +22,7 @@
 ;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz>
 ;;; Copyright © 2018 Amirouche Boubekki <amirouche@hypermove.net>
 ;;; Copyright © 2018 Tim Gesthuizen <tim.gesthuizen@yahoo.de>
+;;; Copyright © 2019 Jens Mølgaard <jens@zete.tk>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -562,6 +563,78 @@ one-time-password (OTP) secrets, generating OTP codes, and displaying secret
 key URIs using the standard otpauth:// scheme.")
     (license license:gpl3+)))
 
+(define-public qtpass
+  (package
+    (name "qtpass")
+    (version "1.2.3")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/IJHack/QtPass.git")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "1vfhfyccrxq9snyvayqfzm5rqik8ny2gysyv7nipc91kvhq3bhky"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#: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-before 'check 'check-setup
+           ;; Make Qt render "offscreen", required for tests.
+           (lambda _
+             (setenv "QT_QPA_PLATFORM" "offscreen")
+             #t)))))
+    (native-inputs
+     `(("qttools" ,qttools)))
+    (inputs
+     `(("qtbase" ,qtbase)
+       ("qtsvg" ,qtsvg)))
+    (home-page "https://qtpass.org")
+    (synopsis "GUI for password manager password-store")
+    (description
+     "Qt-based graphical user interface for the password manager
+password-store also known as pass.  Can use either pass or gpg to interact
+with password-store files.  Features configurable password generation,
+templates, clipboard handling, and per folder settings for multi-recipient
+encryption.")
+    (license license:gpl3+)))
+
 (define-public argon2
   (package
     (name "argon2")
-- 
2.22.0


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

  reply	other threads:[~2019-07-03  9:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-20  7:53 [bug#36303] [PATCH] gnu: Add qtpass Jens Mølgaard
2019-07-02 22:23 ` Ludovic Courtès
2019-07-03  9:29   ` Jens Mølgaard [this message]
2019-07-04  9:48     ` bug#36303: " Ludovic Courtès

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

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87o92bbh58.fsf@zete.tk \
    --to=jens@zete.tk \
    --cc=36303@debbugs.gnu.org \
    --cc=ludo@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 public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).