From patchwork Mon Dec 12 11:49:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tobias Kortkamp X-Patchwork-Id: 45190 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 9D7E427BBEC; Mon, 12 Dec 2022 11:58:07 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id ED53627BBE9 for ; Mon, 12 Dec 2022 11:58:05 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p4hJt-0000he-GE; Mon, 12 Dec 2022 06:50:05 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p4hJr-0000fX-P4 for guix-patches@gnu.org; Mon, 12 Dec 2022 06:50:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p4hJr-0005iT-Er for guix-patches@gnu.org; Mon, 12 Dec 2022 06:50:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p4hJr-0000zm-AH for guix-patches@gnu.org; Mon, 12 Dec 2022 06:50:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#60003] [PATCH 3/3] gnu: Add pass-import. Resent-From: Tobias Kortkamp Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 12 Dec 2022 11:50:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60003 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 60003@debbugs.gnu.org Cc: Tobias Kortkamp Received: via spool by 60003-submit@debbugs.gnu.org id=B60003.16708457983801 (code B ref 60003); Mon, 12 Dec 2022 11:50:03 +0000 Received: (at 60003) by debbugs.gnu.org; 12 Dec 2022 11:49:58 +0000 Received: from localhost ([127.0.0.1]:52474 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p4hJi-0000zF-NM for submit@debbugs.gnu.org; Mon, 12 Dec 2022 06:49:58 -0500 Received: from mail-ej1-f50.google.com ([209.85.218.50]:44824) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p4hJe-0000yl-LY for 60003@debbugs.gnu.org; Mon, 12 Dec 2022 06:49:51 -0500 Received: by mail-ej1-f50.google.com with SMTP id x22so27249861ejs.11 for <60003@debbugs.gnu.org>; Mon, 12 Dec 2022 03:49:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=03gm9y2r9ebVUT5QsX5vP+81tOsQlf2X62f/KxxEj8Q=; b=jSPitikXq9P0odTywd4EZ0T2xLJEs7+hMA/e5/eImyPGFY0VSsJqxhon0BlEZHfF6M +ujhMg9l+/V3maclbb3hiKUGuGiQPiCEzssBUTJRBj8A5pWBQ7AtToTqu5sODa7GhVpA h1iSyAVCkCuBmsMvKbCwI1lpXfbGTUDp81MOuQ083yjYzPmsabyqTXqwie3RWdyHMdiw npxnkACPGXSpIq0BpTS9rSfx+gc8DHeW0GxnMlQUIyL9J9ztG/7Rg3jv65s6fuNRu2lZ 4vlz2LsCyznAwmTgCisYRyGWgAhvRiElY9SnBmfsIXHKyPgCT+srXInMHHKnD9yQvqmI UFRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=03gm9y2r9ebVUT5QsX5vP+81tOsQlf2X62f/KxxEj8Q=; b=H7tZ7CgEcDr1eMfjMF17zfC7tA02j09/7B7tSywGoxLzePyls7nf+4/XfuzR6XgV50 MlAt7FzPZ/91klHmuUyxE6j/g+/Tv2nTOslUvfnio8Uw4EJOYkpkLyt9Jr/BPVk1MiX1 qQiyr2fIL0Ui40yJSLzopSQL4j+EgyG+lEtlnFfXnfIeQyvDrtNLBUOSn4VGVXROBEIi naU0FUOZVq12OA8v48o/i/0gBAlFUL5aBZJfb0fs3VrcYu+X6lHZUa50OioJFvfGLldw 4VQXpHqYaIGSUKjvzYXOj+lSHz80rtkPPpDYd9wwAyB34mrP8B3fWzswDdDKQOt3KmuM IFWQ== X-Gm-Message-State: ANoB5pnX6qlkQn4COw1AKvysrq186eNCHx6HnmfsGuVBE5lQCEVbPyoY f2QdzquD8RktkZ8wJjeqZGqelKM/BTcaiw== X-Google-Smtp-Source: AA0mqf4jkM0Nral5SCbMf6VIipyiAfUrAhFpVs5sso5gA+zXXk/rW0OPU9GiDhwrfIezj9jArEzG7g== X-Received: by 2002:a17:906:58a:b0:78d:f455:c3a7 with SMTP id 10-20020a170906058a00b0078df455c3a7mr12313949ejn.77.1670845784631; Mon, 12 Dec 2022 03:49:44 -0800 (PST) Received: from anubis.kortkamp.xyz (p200300ff7f02ab00046b83ca6c4becd9.dip0.t-ipconnect.de. [2003:ff:7f02:ab00:46b:83ca:6c4b:ecd9]) by smtp.gmail.com with ESMTPSA id o11-20020a50fd8b000000b00461aca1c7b6sm3766134edt.6.2022.12.12.03.49.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Dec 2022 03:49:44 -0800 (PST) From: Tobias Kortkamp Date: Mon, 12 Dec 2022 12:49:34 +0100 Message-Id: X-Mailer: git-send-email 2.38.1 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/password-utils.scm (pass-import): New variable. --- gnu/packages/password-utils.scm | 71 +++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) diff --git a/gnu/packages/password-utils.scm b/gnu/packages/password-utils.scm index aab0a3f2a4..79781ed9e6 100644 --- a/gnu/packages/password-utils.scm +++ b/gnu/packages/password-utils.scm @@ -38,6 +38,7 @@ ;;; Copyright © 2022 Maxime Devos ;;; Copyright © 2022 ( ;;; Copyright © 2022 Nicolas Graves +;;; Copyright © 2022 Tobias Kortkamp ;;; ;;; 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) @@ -1492,3 +1494,72 @@ (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/" 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") + #$(file-append python-wrapper "/bin/python"))) + (substitute* '("setup.py") + (("base = '/usr'") + (string-append "base = '" #$output "'")) + (("sys\\.prefix") + (string-append "'" #$output "'"))) + (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")))) + (add-after 'install 'wrap-extension + (lambda _ + (let ((pylib (string-append #$output "/lib/python" + #$(version-major+minor + (package-version python)) + "/site-packages")) + (extension (string-append #$output + "/lib/password-store/extensions/import.bash"))) + (wrap-program extension + (list "GUIX_PYTHONPATH" ":" + 'prefix + (list (getenv "GUIX_PYTHONPATH") + pylib))))))))) + (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 too.") + (license license:gpl3+)))