aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages
diff options
context:
space:
mode:
authorClément Lassieur <clement@lassieur.org>2023-10-17 16:53:57 +0200
committerClément Lassieur <clement@lassieur.org>2023-10-25 22:42:52 +0200
commit6c894b7a1a6a7a0f7c51a44136bba00dc0b5250c (patch)
tree769d35f9f2161a47e96f55b2856d4b8b7fa53612 /gnu/packages
parent2844f24e892adda3f4be7c1ace69bd755a43aae8 (diff)
downloadguix-6c894b7a1a6a7a0f7c51a44136bba00dc0b5250c.tar.gz
guix-6c894b7a1a6a7a0f7c51a44136bba00dc0b5250c.zip
gnu: Add passff.
* gnu/packages/browser-extensions.scm (passff-host): New variable. (passff): New variable. Change-Id: I0f6f4b0c319e5cffd0940421a4d8bdc73d8d806b
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/browser-extensions.scm76
1 files changed, 76 insertions, 0 deletions
diff --git a/gnu/packages/browser-extensions.scm b/gnu/packages/browser-extensions.scm
index 252c95729d..5b34972499 100644
--- a/gnu/packages/browser-extensions.scm
+++ b/gnu/packages/browser-extensions.scm
@@ -24,10 +24,14 @@
#:use-module (guix git-download)
#:use-module (guix build-system copy)
#:use-module (guix build-system gnu)
+ #:use-module (guix build-system trivial)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (gnu build chromium-extension)
#:use-module (gnu build icecat-extension)
+ #:use-module (gnu packages base)
+ #:use-module (gnu packages bash)
#:use-module (gnu packages compression)
+ #:use-module (gnu packages password-utils)
#:use-module (gnu packages python))
(define play-to-kodi
@@ -150,3 +154,75 @@ ungoogled-chromium.")
(define-public ublock-origin/icecat
(make-icecat-extension ublock-origin "firefox"))
+
+(define-public passff-host
+ (package
+ (name "passff-host")
+ (version "1.2.3")
+ (home-page "https://github.com/passff/passff-host")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference (url home-page) (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1p18l1jh20x4v8dj64z9qjlp96fxsl5h069iynxfpbkzj6hd74yl"))))
+ (build-system trivial-build-system)
+ (arguments
+ (list
+ #:modules '((guix build utils))
+ #:builder
+ #~(begin
+ (use-modules (guix build utils))
+ (setenv "PATH" (string-join
+ (list #$(file-append coreutils "/bin")
+ #$(file-append grep "/bin")
+ #$(file-append password-store "/bin")
+ #$(file-append python "/bin")
+ #$(file-append sed "/bin")
+ #$(file-append which "/bin")) ":"))
+ (copy-recursively #$source ".")
+ (substitute* "src/install_host_app.sh"
+ (("#!/usr/bin/env sh") #$(file-append bash-minimal "/bin/sh"))
+ (("(TARGET_DIR_FIREFOX=).*" all var)
+ (string-append var #$output
+ "/lib/icecat/native-messaging-hosts")))
+ (invoke #$(file-append gnu-make "/bin/make")
+ (string-append "VERSION=" #$version) "install-unix"))))
+ (synopsis "Host app for the WebExtension PassFF")
+ (description "This piece of software wraps around the zx2c4 pass shell
+command. It has to be installed for the PassFF browser extension to work
+properly.")
+ (license license:gpl2+)))
+
+(define passff
+ (package
+ (name "passff")
+ (version "1.15")
+ (home-page "https://github.com/passff/passff")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference (url home-page) (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1gymqyqppr8k9fqv5js7f6pk6hcc47qpf51x5cy6aahsk2v1qssj"))))
+ (propagated-inputs (list passff-host))
+ (build-system copy-build-system)
+ (properties '((addon-id . "passff@invicem.pro")))
+ (arguments
+ `(#:install-plan '(("src" ,(assq-ref properties 'addon-id)))
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'substitute-placeholder
+ (lambda _
+ (substitute* "src/manifest.json"
+ (("_VERSIONHOLDER_") ,version)))))))
+ (synopsis "zx2c4 pass management extension for Mozilla Firefox")
+ (description "This extension will allow you to access your zx2c4 pass
+repository directly from your web browser. You can choose to automatically
+fill and submit login forms if a matching password entry is found.")
+ (license license:gpl2+)))
+
+(define-public passff/icecat
+ (make-icecat-extension passff))