diff mbox series

[bug#54090,v2] gnu: Add tessen.

Message ID 20220310065346.7716-1-tanguy@bioneland.org
State Accepted
Headers show
Series [bug#54090,v2] gnu: Add tessen. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Tanguy LE CARROUR March 10, 2022, 6:53 a.m. UTC
* gnu/packages/password-utils.scm (tessen): New variable.
---
 gnu/packages/password-utils.scm | 36 ++++++++++++++++++++++++++++++++-
 1 file changed, 35 insertions(+), 1 deletion(-)

Comments

Nicolas Goaziou March 10, 2022, 6:56 p.m. UTC | #1
Hello,

Tanguy Le Carrour <tanguy@bioneland.org> writes:

> * gnu/packages/password-utils.scm (tessen): New variable.

Thanks. I simply suggest some style overhaul!

> +    (arguments

(list
 #:phases
 #~(modify-phases ...)
 ...)

> +     `(#:phases (modify-phases %standard-phases
> +                  (add-after 'unpack 'patch-wtype-path
> +                    (lambda* (#:key inputs #:allow-other-keys)
> +                      (let ((wtype (assoc-ref inputs "wtype")))
> +                        (substitute* "tessen"
> +                          (("wtype") (string-append wtype "/bin/wtype"))))))

You can drop the `wtype' binding, and use

  (search-input-file inputs "/bin/wtype")

as a replacement for "wtype".

> +                  (delete 'configure)

There should be a comment (perhaps there is no configure script)

> +                  (delete 'check))

Disabling tests is done with "#:tests? #f", but then, a comment is
necessary (perhaps there are no tests).
)
> +       #:make-flags
> +       (let ((out (assoc-ref %outputs "out")))

  #~(let ...)

> +         (list (string-append "PREFIX=" out)))))

You can drop the `out' binding and use (string-append "PREFIX=" #$output)

You'll need to add

  #:use-module (guix gexp)

at the top-level for those changes.

Regards,
Tanguy LE CARROUR March 11, 2022, 7:52 a.m. UTC | #2
Hi Nicolas,


Quoting Nicolas Goaziou (2022-03-10 19:56:19)
> Tanguy Le Carrour <tanguy@bioneland.org> writes:
> 
> > * gnu/packages/password-utils.scm (tessen): New variable.
> 
> Thanks. I simply suggest some style overhaul!

Thanks for all those useful comments!
I'm not sure I understand everything when it comes to gexp, though! ^_^'
Anyhow, it works, so I'm sending a v3…

Regards,
diff mbox series

Patch

diff --git a/gnu/packages/password-utils.scm b/gnu/packages/password-utils.scm
index 440bb927a6..f8990cc5f5 100644
--- a/gnu/packages/password-utils.scm
+++ b/gnu/packages/password-utils.scm
@@ -23,7 +23,7 @@ 
 ;;; Copyright © 2018 Amirouche Boubekki <amirouche@hypermove.net>
 ;;; Copyright © 2018, 2019, 2020 Tim Gesthuizen <tim.gesthuizen@yahoo.de>
 ;;; Copyright © 2019 Jens Mølgaard <jens@zete.tk>
-;;; Copyright © 2019 Tanguy Le Carrour <tanguy@bioneland.org>
+;;; Copyright © 2019,2022 Tanguy Le Carrour <tanguy@bioneland.org>
 ;;; Copyright © 2020 Guillaume Le Vaillant <glv@posteo.net>
 ;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
 ;;; Copyright © 2020 Jean-Baptiste Note <jean-baptiste.note@m4x.org>
@@ -736,6 +736,40 @@  (define-public rofi-pass
 @end enumerate")
     (license license:gpl3)))
 
+(define-public tessen
+  (package
+    (name "tessen")
+    (version "2.1.0")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/ayushnix/tessen/")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1ddsjhzp1qy3jfhxlrzcxgp0gza234yc0sdlngwa3xdj0wr40zs0"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:phases (modify-phases %standard-phases
+                  (add-after 'unpack 'patch-wtype-path
+                    (lambda* (#:key inputs #:allow-other-keys)
+                      (let ((wtype (assoc-ref inputs "wtype")))
+                        (substitute* "tessen"
+                          (("wtype") (string-append wtype "/bin/wtype"))))))
+                  (delete 'configure)
+                  (delete 'check))
+       #:make-flags
+       (let ((out (assoc-ref %outputs "out")))
+         (list (string-append "PREFIX=" out)))))
+    (native-inputs (list scdoc))
+    (inputs (list wtype))
+    (home-page "https://github.com/ayushnix/tessen")
+    (synopsis "Frontend for password-store and gopass")
+    (description "Tessen is a bash script that can autotype and copy data
+from password-store and gopass files.")
+    (license license:gpl2+)))
+
 (define-public browserpass-native
   (package
     (name "browserpass-native")