From: Tobias Kortkamp <tobias.kortkamp@gmail.com>
To: 60003@debbugs.gnu.org
Cc: Tobias Kortkamp <tobias.kortkamp@gmail.com>
Subject: [bug#60003] [PATCH 3/3] gnu: Add pass-import.
Date: Wed, 11 Jan 2023 13:44:28 +0100 [thread overview]
Message-ID: <da8c6ad0bb8acddc1126d09adb562f5ac676c8e3.1673440963.git.tobias.kortkamp@gmail.com> (raw)
In-Reply-To: <40ad2d0262052c5ddac3c957391b2ac2df9fede2.1673440963.git.tobias.kortkamp@gmail.com>
* gnu/packages/password-utils.scm (pass-import): New variable.
---
gnu/packages/password-utils.scm | 72 +++++++++++++++++++++++++++++++++
1 file changed, 72 insertions(+)
diff --git a/gnu/packages/password-utils.scm b/gnu/packages/password-utils.scm
index 9fc41d9b0a..f84e80e9cb 100644
--- a/gnu/packages/password-utils.scm
+++ b/gnu/packages/password-utils.scm
@@ -38,6 +38,7 @@
;;; Copyright © 2022 Maxime Devos <maximedevos@telenet.be>
;;; Copyright © 2022 ( <paren@disroot.org>
;;; Copyright © 2022 Nicolas Graves <ngraves@ngraves.fr>
+;;; Copyright © 2022 Tobias Kortkamp <tobias.kortkamp@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -101,6 +102,7 @@ (define-module (gnu packages password-utils)
#:use-module (gnu packages perl)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
+ #:use-module (gnu packages python-crypto)
#:use-module (gnu packages python-web)
#:use-module (gnu packages python-xyz)
#:use-module (gnu packages readline)
@@ -1493,3 +1495,73 @@ (define-public xkcdpass
license:lgpl2.0 ;finnish word list
license:lgpl2.1 ;portuguese word list
license:mpl1.1)))) ;portuguese word list
+
+(define-public pass-import
+ (package
+ (name "pass-import")
+ (version "3.4")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/roddhjav/pass-import"
+ "/releases/download/v" version "/pass-import-"
+ version ".tar.gz"))
+ (sha256
+ (base32 "18vh97h3bmspwqhb9xjkapk3p8hy4rxhazrcc06f6pdz8rb6rxxp"))))
+ (build-system python-build-system)
+ (arguments
+ (list #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'patch-paths
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* '("import.bash")
+ (("python3")
+ (search-input-file inputs "/bin/python3")))
+ (substitute* '("setup.py")
+ (("base = '/usr'")
+ (string-append "base = '" #$output "'"))
+ (("sys\\.prefix")
+ (string-append "'" #$output "'")))))
+ (add-after 'install 'wrap-extension
+ (lambda _
+ (let ((pylib (string-append #$output "/lib/python"
+ #$(version-major+minor
+ (package-version python))
+ "/site-packages"))
+ (extension "/lib/password-store/extensions/import.bash"))
+ (wrap-program (string-append #$output extension)
+ (list "GUIX_PYTHONPATH" ":"
+ 'prefix
+ (list (getenv "GUIX_PYTHONPATH")
+ pylib))))))
+ (add-before 'check 'disable-lastpass-and-dbus-tests
+ (lambda _
+ (substitute* '("tests/imports/test_parse.py")
+ ;; requires running D-Bus session
+ (("test_import_gnome_keyring") "disabled_test_import_gnome_keyring")
+ ;; requires lastpass
+ (("test_import_lastpass") "disabled_test_import_lastpass"))
+ (substitute* '("tests/exports/test_lastpass.py")
+ (("test_import_lastpass") "disabled_test_import_lastpass")
+ (("test_lastpass_exist") "disabled_test_lastpass_exist")
+ (("test_lastpass_insert") "disabled_test_lastpass_insert")
+ (("test_lastpass_show") "disabled_test_lastpass_show")
+ (("test_lastpass_list") "disabled_test_lastpass_list")
+ (("test_lastpass_isvalid") "disabled_test_lastpass_isvalid")))))))
+ (inputs (list gnupg
+ password-store
+ python-cryptography
+ python-defusedxml
+ python-magic
+ python-pyaml
+ python-pykeepass
+ python-requests
+ python-secretstorage
+ python-zxcvbn))
+ (home-page "https://github.com/roddhjav/pass-import")
+ (synopsis
+ "Pass extension for importing data from many password managers")
+ (description
+ "This package provides a pass extension for importing data from many password
+managers. @command{pimport} can be used to export data to other password managers
+like gopass or keepassxc.")
+ (license license:gpl3+)))
--
2.38.1
next parent reply other threads:[~2023-01-11 12:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <40ad2d0262052c5ddac3c957391b2ac2df9fede2.1673440963.git.tobias.kortkamp@gmail.com>
2023-01-11 12:44 ` Tobias Kortkamp [this message]
2022-12-12 11:46 [bug#60003] [PATCH 0/3] gnu: Add pass-import Tobias Kortkamp
2022-12-12 11:49 ` [bug#60003] [PATCH 3/3] " Tobias Kortkamp
2023-01-05 15:21 ` Jelle Licht
2023-01-11 11:55 ` Tobias Kortkamp
2023-02-02 13:13 ` Jelle Licht
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=da8c6ad0bb8acddc1126d09adb562f5ac676c8e3.1673440963.git.tobias.kortkamp@gmail.com \
--to=tobias.kortkamp@gmail.com \
--cc=60003@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.