unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#39077] [PATCH 0/4] gnu: Add browserpass-native.
@ 2020-01-10 22:29 Alex Griffin
  2020-01-10 22:32 ` [bug#39077] [PATCH 1/4] gnu: go-github-com-sirupsen-logrus: Propagate inputs Alex Griffin
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Alex Griffin @ 2020-01-10 22:29 UTC (permalink / raw)
  To: 39077

This patch series adds browserpass-native. Browserpass is a browser extension that integrates the `pass` password manager with the browser. This does not add the extension itself, only the native messaging component which runs outside of the browser process and communicates with the extension. Packaging the extension itself requires better Node.js infrastructure in Guix, so it is left to the user to install on their own.

I think this is the first native messaging host to be packaged for Guix, so it probably makes sense to get input from the maintainers of IceCat and ungoogled-chromium. The native messaging host is not automatically detected by either browser - the user needs to run something like `make -C $(guix build browserpass-native)/lib/browserpass hosts-chromium-user` to install it into their home directory.

Nix builds a wrapper around Firefox to detect the native messaging hosts that are installed, and I think Guix should consider doing something similar.

-- 
Alex Griffin

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [bug#39077] [PATCH 1/4] gnu: go-github-com-sirupsen-logrus: Propagate inputs.
  2020-01-10 22:29 [bug#39077] [PATCH 0/4] gnu: Add browserpass-native Alex Griffin
@ 2020-01-10 22:32 ` Alex Griffin
  2020-01-10 22:33 ` [bug#39077] [PATCH 2/4] gnu: Add go-github-com-rifflock-lfshook Alex Griffin
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Alex Griffin @ 2020-01-10 22:32 UTC (permalink / raw)
  To: 39077

[-- Attachment #1: Type: text/plain, Size: 26 bytes --]

attached

-- 
Alex Griffin

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-go-github-com-sirupsen-logrus-Propagate-inputs.patch --]
[-- Type: text/x-patch; name="0001-gnu-go-github-com-sirupsen-logrus-Propagate-inputs.patch", Size: 1341 bytes --]

From 8b3c5415e581309abf9bff0ec73f910e859c60f1 Mon Sep 17 00:00:00 2001
From: Alex Griffin <a@ajgrf.com>
Date: Fri, 10 Jan 2020 13:25:19 -0600
Subject: [PATCH 1/4] gnu: go-github-com-sirupsen-logrus: Propagate inputs.

* gnu/packages/golang.scm (go-github-com-sirupsen-logrus): Propagate inputs.
---
 gnu/packages/golang.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index f94251abaf..1b7f0f3487 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -14,7 +14,7 @@
 ;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz>
 ;;; Copyright @ 2018, 2019 Katherine Cox-Buday <cox.katherine.e@gmail.com>
 ;;; Copyright @ 2019 Giovanni Biscuolo <g@xelera.eu>
-;;; Copyright @ 2019 Alex Griffin <a@ajgrf.com>
+;;; Copyright @ 2019, 2020 Alex Griffin <a@ajgrf.com>
 ;;; Copyright © 2019 Arun Isaac <arunisaac@systemreboot.net>
 ;;;
 ;;; This file is part of GNU Guix.
@@ -1169,7 +1169,7 @@ GNU extensions} to the POSIX recommendations for command-line options.")
         (base32
          "0g5z7al7kky11ai2dhac6gkp3b5pxsvx72yj3xg4wg3265gbn7yz"))))
     (build-system go-build-system)
-    (native-inputs
+    (propagated-inputs
      `(("go-golang-org-x-crypto"
         ,go-golang-org-x-crypto)
        ("go-github-com-stretchr-testify"
-- 
2.24.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [bug#39077] [PATCH 2/4] gnu: Add go-github-com-rifflock-lfshook.
  2020-01-10 22:29 [bug#39077] [PATCH 0/4] gnu: Add browserpass-native Alex Griffin
  2020-01-10 22:32 ` [bug#39077] [PATCH 1/4] gnu: go-github-com-sirupsen-logrus: Propagate inputs Alex Griffin
@ 2020-01-10 22:33 ` Alex Griffin
  2020-01-10 22:34 ` [bug#39077] [PATCH 3/4] gnu: Add go-github-com-mattn-go-zglob Alex Griffin
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Alex Griffin @ 2020-01-10 22:33 UTC (permalink / raw)
  To: 39077

[-- Attachment #1: Type: text/plain, Size: 26 bytes --]

attached

-- 
Alex Griffin

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0002-gnu-Add-go-github-com-rifflock-lfshook.patch --]
[-- Type: text/x-patch; name="0002-gnu-Add-go-github-com-rifflock-lfshook.patch", Size: 1948 bytes --]

From 31bce6a641343d809a84678fff67259936a9b56c Mon Sep 17 00:00:00 2001
From: Alex Griffin <a@ajgrf.com>
Date: Fri, 10 Jan 2020 13:32:32 -0600
Subject: [PATCH 2/4] gnu: Add go-github-com-rifflock-lfshook.

* gnu/packages/golang.scm (go-github-com-rifflock-lfshook): New variable.
---
 gnu/packages/golang.scm | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 1b7f0f3487..9dd9b37cf0 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -1184,6 +1184,31 @@ GNU extensions} to the POSIX recommendations for command-line options.")
 compatible with the standard library logger.")
     (license license:expat)))
 
+(define-public go-github-com-rifflock-lfshook
+  (package
+    (name "go-github-com-rifflock-lfshook")
+    (version "2.4")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/rifflock/lfshook.git")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "0wxqjcjfg8c0klmdgmbw3ckagby3wg9rkga9ihd4fsf05x5scxrc"))))
+    (build-system go-build-system)
+    (arguments
+     `(#:import-path "github.com/rifflock/lfshook"))
+    (propagated-inputs
+     `(("go-github-com-sirupsen-logrus" ,go-github-com-sirupsen-logrus)))
+    (home-page "https://github.com/rifflock/lfshook")
+    (synopsis "Local File System hook for Logrus logger")
+    (description "This package provides a hook for Logrus to write directly to
+a file on the filesystem.  The log levels are dynamic at instantiation of the
+hook, so it is capable of logging at some or all levels.")
+    (license license:expat)))
+
 (define-public go-github-com-kardianos-osext
   (let ((commit "ae77be60afb1dcacde03767a8c37337fad28ac14")
         (revision "1"))
-- 
2.24.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [bug#39077] [PATCH 3/4] gnu: Add go-github-com-mattn-go-zglob.
  2020-01-10 22:29 [bug#39077] [PATCH 0/4] gnu: Add browserpass-native Alex Griffin
  2020-01-10 22:32 ` [bug#39077] [PATCH 1/4] gnu: go-github-com-sirupsen-logrus: Propagate inputs Alex Griffin
  2020-01-10 22:33 ` [bug#39077] [PATCH 2/4] gnu: Add go-github-com-rifflock-lfshook Alex Griffin
@ 2020-01-10 22:34 ` Alex Griffin
  2020-01-10 22:34 ` [bug#39077] [PATCH 4/4] gnu: Add browserpass-native Alex Griffin
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Alex Griffin @ 2020-01-10 22:34 UTC (permalink / raw)
  To: 39077

[-- Attachment #1: Type: text/plain, Size: 26 bytes --]

attached

-- 
Alex Griffin

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0003-gnu-Add-go-github-com-mattn-go-zglob.patch --]
[-- Type: text/x-patch; name="0003-gnu-Add-go-github-com-mattn-go-zglob.patch", Size: 1686 bytes --]

From 9ff783804d62248eb0efcfb69588b4e3cf49e2e1 Mon Sep 17 00:00:00 2001
From: Alex Griffin <a@ajgrf.com>
Date: Fri, 10 Jan 2020 13:36:57 -0600
Subject: [PATCH 3/4] gnu: Add go-github-com-mattn-go-zglob.

* gnu/packages/golang.scm (go-github-com-mattn-go-zglob): New variable.
---
 gnu/packages/golang.scm | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 9dd9b37cf0..8665a5f26e 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -3105,3 +3105,25 @@ alternative to @code{reflect.DeepEqual} for comparing whether two values
 are semantically equal in Go (for writing tests).")
     (home-page "https://godoc.org/github.com/google/go-cmp/cmp")
     (license license:asl2.0)))
+
+(define-public go-github-com-mattn-go-zglob
+  (package
+    (name "go-github-com-mattn-go-zglob")
+    (version "0.0.1")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/mattn/go-zglob.git")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1sncdyq5fbd42al4amyy91h7vlzm3wm6c9vl8za2pjgfgsd581fz"))))
+    (build-system go-build-system)
+    (arguments
+     `(#:import-path "github.com/mattn/go-zglob"))
+    (home-page "https://github.com/mattn/go-zglob")
+    (synopsis "Glob library that descends into other directories")
+    (description " A glob library that implements descending into other
+directories.  It is optimized for filewalking. ")
+    (license license:expat)))
-- 
2.24.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [bug#39077] [PATCH 4/4] gnu: Add browserpass-native.
  2020-01-10 22:29 [bug#39077] [PATCH 0/4] gnu: Add browserpass-native Alex Griffin
                   ` (2 preceding siblings ...)
  2020-01-10 22:34 ` [bug#39077] [PATCH 3/4] gnu: Add go-github-com-mattn-go-zglob Alex Griffin
@ 2020-01-10 22:34 ` Alex Griffin
  2020-02-22 14:20 ` [bug#39077] [PATCH 0/4] " Alex Griffin
  2020-03-13  2:19 ` bug#39077: " Alex Griffin
  5 siblings, 0 replies; 7+ messages in thread
From: Alex Griffin @ 2020-01-10 22:34 UTC (permalink / raw)
  To: 39077

[-- Attachment #1: Type: text/plain, Size: 26 bytes --]

attached

-- 
Alex Griffin

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0004-gnu-Add-browserpass-native.patch --]
[-- Type: text/x-patch; name="0004-gnu-Add-browserpass-native.patch", Size: 4970 bytes --]

From 357fce41e0575a04711395d0bd79ee6099ee9938 Mon Sep 17 00:00:00 2001
From: Alex Griffin <a@ajgrf.com>
Date: Fri, 10 Jan 2020 13:37:30 -0600
Subject: [PATCH 4/4] gnu: Add browserpass-native.

* gnu/packages/password-utils.scm (browserpass-native): New variable.
---
 gnu/packages/password-utils.scm | 80 ++++++++++++++++++++++++++++++++-
 1 file changed, 79 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/password-utils.scm b/gnu/packages/password-utils.scm
index db5f54e1d9..2043e368bd 100644
--- a/gnu/packages/password-utils.scm
+++ b/gnu/packages/password-utils.scm
@@ -6,7 +6,7 @@
 ;;; Copyright © 2016 Jessica Tallon <tsyesika@tsyesika.se>
 ;;; Copyright © 2016 Andreas Enge <andreas@enge.fr>
 ;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
-;;; Copyright © 2016, 2019 Alex Griffin <a@ajgrf.com>
+;;; Copyright © 2016, 2019, 2020 Alex Griffin <a@ajgrf.com>
 ;;; Copyright © 2017 Leo Famulari <leo@famulari.name>
 ;;; Copyright © 2017, 2018 Clément Lassieur <clement@lassieur.org>
 ;;; Copyright © 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
@@ -44,6 +44,7 @@
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
+  #:use-module (guix build-system go)
   #:use-module (guix build-system trivial)
   #:use-module (guix download)
   #:use-module (guix git-download)
@@ -62,6 +63,7 @@
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages gnupg)
+  #:use-module (gnu packages golang)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages guile)
   #:use-module (gnu packages kerberos)
@@ -701,6 +703,82 @@ using password-store through rofi interface:
 @end enumerate")
     (license license:gpl3)))
 
+(define-public browserpass-native
+  (package
+    (name "browserpass-native")
+    (version "3.0.6")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/browserpass/browserpass-native.git")
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "0q3bsla07zjl6i69nj1axbkg2ia89pvh0jg6nlqgbm2kpzzbn0pz"))))
+    (build-system go-build-system)
+    (arguments
+     `(#:import-path "github.com/browserpass/browserpass-native"
+       #:install-source? #f
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'build 'patch-makefile
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               ;; This doesn't go in #:make-flags because the Makefile itself
+               ;; gets installed.
+               (substitute*
+                   "src/github.com/browserpass/browserpass-native/Makefile"
+                 (("PREFIX \\?= /usr")
+                  (string-append "PREFIX ?= " out)))
+               #t)))
+         (add-before 'build 'configure
+           (lambda _
+               (with-directory-excursion
+                   "src/github.com/browserpass/browserpass-native"
+                 (invoke "make" "configure"))
+             #t))
+         (replace 'build
+           (lambda _
+               (with-directory-excursion
+                   "src/github.com/browserpass/browserpass-native"
+                 (invoke "make"))
+             #t))
+         (replace 'install
+           (lambda _
+             (with-directory-excursion
+                 "src/github.com/browserpass/browserpass-native"
+               (invoke "make" "install"))
+             #t))
+         (add-after 'install 'wrap-executable
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out"))
+                   (gnupg (assoc-ref inputs "gnupg")))
+               (wrap-program (string-append out "/bin/browserpass")
+                 `("PATH" ":" prefix
+                   (,(string-append gnupg "/bin"))))
+               #t))))))
+    (native-inputs
+     `(("which" ,which)))
+    (inputs
+     `(("gnupg" ,gnupg)
+       ("go-github-com-mattn-go-zglob" ,go-github-com-mattn-go-zglob)
+       ("go-github-com-rifflock-lfshook" ,go-github-com-rifflock-lfshook)
+       ("go-github-com-sirupsen-logrus" ,go-github-com-sirupsen-logrus)
+       ("go-golang-org-x-sys" ,go-golang-org-x-sys)))
+    (home-page "https://github.com/browserpass/browserpass-native")
+    (synopsis "Browserpass native messaging host")
+    (description "Browserpass is a browser extension for pass, a
+UNIX-based password store manager.  It allows you to auto-fill or copy to
+clipboard credentials for the current domain, protecting you from phishing
+attacks.
+
+This package only contains the Browserpass native messaging host.  You must
+also install the browser extension for GNU IceCat or ungoogled-chromium
+separately.")
+    (license license:isc)))
+
 (define-public argon2
   (package
     (name "argon2")
-- 
2.24.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [bug#39077] [PATCH 0/4] gnu: Add browserpass-native.
  2020-01-10 22:29 [bug#39077] [PATCH 0/4] gnu: Add browserpass-native Alex Griffin
                   ` (3 preceding siblings ...)
  2020-01-10 22:34 ` [bug#39077] [PATCH 4/4] gnu: Add browserpass-native Alex Griffin
@ 2020-02-22 14:20 ` Alex Griffin
  2020-03-13  2:19 ` bug#39077: " Alex Griffin
  5 siblings, 0 replies; 7+ messages in thread
From: Alex Griffin @ 2020-02-22 14:20 UTC (permalink / raw)
  To: 39077

I plan on pushing this next weekend unless I hear objections. We can figure out how to make native messaging hosts easier to use later.

-- 
Alex Griffin

^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#39077: [PATCH 0/4] gnu: Add browserpass-native.
  2020-01-10 22:29 [bug#39077] [PATCH 0/4] gnu: Add browserpass-native Alex Griffin
                   ` (4 preceding siblings ...)
  2020-02-22 14:20 ` [bug#39077] [PATCH 0/4] " Alex Griffin
@ 2020-03-13  2:19 ` Alex Griffin
  5 siblings, 0 replies; 7+ messages in thread
From: Alex Griffin @ 2020-03-13  2:19 UTC (permalink / raw)
  To: 39077-done

Pushed in 63299f2840edcd5d942b3433ffb205fcc1fb6eb4.
-- 
Alex Griffin

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-03-13  2:20 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-10 22:29 [bug#39077] [PATCH 0/4] gnu: Add browserpass-native Alex Griffin
2020-01-10 22:32 ` [bug#39077] [PATCH 1/4] gnu: go-github-com-sirupsen-logrus: Propagate inputs Alex Griffin
2020-01-10 22:33 ` [bug#39077] [PATCH 2/4] gnu: Add go-github-com-rifflock-lfshook Alex Griffin
2020-01-10 22:34 ` [bug#39077] [PATCH 3/4] gnu: Add go-github-com-mattn-go-zglob Alex Griffin
2020-01-10 22:34 ` [bug#39077] [PATCH 4/4] gnu: Add browserpass-native Alex Griffin
2020-02-22 14:20 ` [bug#39077] [PATCH 0/4] " Alex Griffin
2020-03-13  2:19 ` bug#39077: " Alex Griffin

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).