unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#54090] [PATCH 0/2] gnu: Add tessen.
@ 2022-02-21 17:43 Tanguy Le Carrour
  2022-02-21 18:33 ` [bug#54090] [PATCH 1/2] gnu: Add wtype Tanguy Le Carrour
                   ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: Tanguy Le Carrour @ 2022-02-21 17:43 UTC (permalink / raw)
  To: 54090; +Cc: Tanguy Le Carrour

Tanguy Le Carrour (2):
  gnu: Add wtype.
  gnu: Add tessen.

 gnu/packages/freedesktop.scm    | 23 +++++++++++++++++++++++
 gnu/packages/password-utils.scm | 33 +++++++++++++++++++++++++++++++++
 2 files changed, 56 insertions(+)

-- 
2.34.0





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

* [bug#54090] [PATCH 1/2] gnu: Add wtype.
  2022-02-21 17:43 [bug#54090] [PATCH 0/2] gnu: Add tessen Tanguy Le Carrour
@ 2022-02-21 18:33 ` Tanguy Le Carrour
  2022-02-21 18:33   ` [bug#54090] [PATCH 2/2] gnu: Add tessen Tanguy Le Carrour
  2022-03-03 22:28   ` Ludovic Courtès
  2022-03-10  6:53 ` [bug#54090] [PATCH v2] " Tanguy Le Carrour
  2022-03-11  7:54 ` [bug#54090] [PATCH v3] " Tanguy Le Carrour
  2 siblings, 2 replies; 17+ messages in thread
From: Tanguy Le Carrour @ 2022-02-21 18:33 UTC (permalink / raw)
  To: 54090; +Cc: Tanguy Le Carrour

* gnu/packages/freedesktop.scm (wtype): New variable.
---
 gnu/packages/freedesktop.scm | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index f89ec0742f..e2c17e0797 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -1201,6 +1201,29 @@ (define-public wev
 XEv.")
     (license license:expat)))
 
+(define-public wtype
+  (package
+    (name "wtype")
+    (version "0.4")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/atx/wtype.git")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0bpix92vzip9vlhzihj3k8h9flrlna231x3y8ah7p4965l177yjd"))))
+    (build-system meson-build-system)
+    (native-inputs
+     (list pkg-config wayland libxkbcommon))
+    (synopsis "Xdotool type for Wayland")
+    (description "Wtype lets you simulate keyboard input and mouse activity,
+move and resize windows, etc.")
+    (home-page "https://github.com/atx/wtype")
+    ;; MIT License
+    (license license:expat)))
+
 (define-public exempi
   (package
     (name "exempi")
-- 
2.34.0





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

* [bug#54090] [PATCH 2/2] gnu: Add tessen.
  2022-02-21 18:33 ` [bug#54090] [PATCH 1/2] gnu: Add wtype Tanguy Le Carrour
@ 2022-02-21 18:33   ` Tanguy Le Carrour
  2022-03-03 22:30     ` [bug#54090] [PATCH 0/2] " Ludovic Courtès
  2022-03-03 22:28   ` Ludovic Courtès
  1 sibling, 1 reply; 17+ messages in thread
From: Tanguy Le Carrour @ 2022-02-21 18:33 UTC (permalink / raw)
  To: 54090; +Cc: Tanguy Le Carrour

* gnu/packages/password-utils.scm (tessen): New variable.
---
 gnu/packages/password-utils.scm | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/gnu/packages/password-utils.scm b/gnu/packages/password-utils.scm
index 440bb927a6..ad21bd3ae8 100644
--- a/gnu/packages/password-utils.scm
+++ b/gnu/packages/password-utils.scm
@@ -736,6 +736,39 @@ (define-public rofi-pass
 @end enumerate")
     (license license:gpl3)))
 
+(define-public tessen
+  (package
+    (name "tessen")
+    (version "2.0.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri
+        (string-append "https://raw.githubusercontent.com/ayushnix/tessen/"
+                       "v" version "/tessen"))
+       (sha256
+        (base32 "1n2q0w31ylnrsvrnv6fz4zc6wxbxrjqx8q4j1fdgamq5b4d9wjcn"))
+       (file-name name)))
+    (build-system trivial-build-system)
+    (arguments
+     `(#:modules ((guix build utils))
+       #:builder
+       (begin
+         (use-modules (guix build utils))
+         (let ((source (string-append (assoc-ref %build-inputs "source")))
+               (script "tessen")
+               (out (assoc-ref %outputs "out")))
+           (copy-file source script)
+           (chmod script #o555)
+           (install-file script (string-append out "/bin"))))))
+    (propagated-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")
-- 
2.34.0





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

* [bug#54090] [PATCH 0/2] gnu: Add tessen.
  2022-02-21 18:33 ` [bug#54090] [PATCH 1/2] gnu: Add wtype Tanguy Le Carrour
  2022-02-21 18:33   ` [bug#54090] [PATCH 2/2] gnu: Add tessen Tanguy Le Carrour
@ 2022-03-03 22:28   ` Ludovic Courtès
  1 sibling, 0 replies; 17+ messages in thread
From: Ludovic Courtès @ 2022-03-03 22:28 UTC (permalink / raw)
  To: Tanguy Le Carrour; +Cc: 54090

Hi,

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

> * gnu/packages/freedesktop.scm (wtype): New variable.

Applied, thanks.

Ludo’.




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

* [bug#54090] [PATCH 0/2] gnu: Add tessen.
  2022-02-21 18:33   ` [bug#54090] [PATCH 2/2] gnu: Add tessen Tanguy Le Carrour
@ 2022-03-03 22:30     ` Ludovic Courtès
  2022-03-06 18:40       ` Tanguy LE CARROUR
  0 siblings, 1 reply; 17+ messages in thread
From: Ludovic Courtès @ 2022-03-03 22:30 UTC (permalink / raw)
  To: Tanguy Le Carrour; +Cc: 54090

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

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

[...]

> +     (origin
> +       (method url-fetch)
> +       (uri
> +        (string-append "https://raw.githubusercontent.com/ayushnix/tessen/"
> +                       "v" version "/tessen"))

Is this a stable URL?

> +       #:builder
> +       (begin
> +         (use-modules (guix build utils))
> +         (let ((source (string-append (assoc-ref %build-inputs "source")))
> +               (script "tessen")
> +               (out (assoc-ref %outputs "out")))

Could you change that to use a gexp, along these lines:

  #:builder #~(begin
                …
                (let ((source #$(package-source this-package))
                      (out    #$output)
                      …)
                  …))

> +    (propagated-inputs
> +     (list wtype))

Could you substitute* the absolute file name of ‘wtype’ in the script
instead of propagating?

TIA!

Ludo’.




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

* [bug#54090] [PATCH 0/2] gnu: Add tessen.
  2022-03-03 22:30     ` [bug#54090] [PATCH 0/2] " Ludovic Courtès
@ 2022-03-06 18:40       ` Tanguy LE CARROUR
  2022-03-06 19:33         ` Maxime Devos
  0 siblings, 1 reply; 17+ messages in thread
From: Tanguy LE CARROUR @ 2022-03-06 18:40 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 54090

Hi Ludo’

Thanks for reviewing!


Quoting Ludovic Courtès (2022-03-03 23:30:23)
> Tanguy Le Carrour <tanguy@bioneland.org> skribis:
> 
> > * gnu/packages/password-utils.scm (tessen): New variable.
> 
> [...]
> 
> > +     (origin
> > +       (method url-fetch)
> > +       (uri
> > +        (string-append "https://raw.githubusercontent.com/ayushnix/tessen/"
> > +                       "v" version "/tessen"))
> 
> Is this a stable URL?

As stable as it can get, nowadays?! ^_^'
Anyway, might not be a problem any more once you've reached the end of
this email…


> > +       #:builder
> > +       (begin
> > +         (use-modules (guix build utils))
> > +         (let ((source (string-append (assoc-ref %build-inputs "source")))
> > +               (script "tessen")
> > +               (out (assoc-ref %outputs "out")))
> 
> Could you change that to use a gexp, along these lines:
> 
>   #:builder #~(begin
>                 …
>                 (let ((source #$(package-source this-package))
>                       (out    #$output)
>                       …)
>                   …))

Mmmm… I tried, but could not get anything to work! I ended up with:

```
#:builder #~(begin
             (use-modules (guix build utils))
             (let ((source #$(package-source this-package))
                   (out    #$output)
                   (wtype  #$(this-package-input "wtype"))
                   (script "tessen"))
               (copy-file source script)
               (chmod script #o555)
               (substitute* script
                 (("wtype") (string-append wtype "/bin/wtype")))
               (install-file script (string-append out "/bin"))))
```

But it failed with:

```
ERROR: In procedure %resolve-variable:
Unbound variable: gexp
```


> > +    (propagated-inputs
> > +     (list wtype))
> 
> Could you substitute* the absolute file name of ‘wtype’ in the script
> instead of propagating?

This, at least, I think I did properly! Without the Gexp, I wrote
something that works:

```
(begin
 (use-modules (guix build utils))
 (let ((source (string-append (assoc-ref %build-inputs "source")))
       (script "tessen")
       (out (assoc-ref %outputs "out")))
       (out    (assoc-ref %outputs "out"))
       (wtype  (assoc-ref %build-inputs "wtype"))
       (script "tessen"))
   (copy-file source script)
   (chmod script #o555)
   (install-file script (string-append out "/bin"))))))
```

But actually, I figured out that Tessen was not "just" a Bash script and
could be "properly" `make install`-ed. So, I'll try to rewrite a proper
package definition, fetching the source from Git and installing it the
good old way! I can then use a more familiar `modify-phases` to
substitute `wtype` in the script.

Sounds like a plan to you?!

Regards,

-- 
Tanguy




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

* [bug#54090] [PATCH 0/2] gnu: Add tessen.
  2022-03-06 18:40       ` Tanguy LE CARROUR
@ 2022-03-06 19:33         ` Maxime Devos
  0 siblings, 0 replies; 17+ messages in thread
From: Maxime Devos @ 2022-03-06 19:33 UTC (permalink / raw)
  To: Tanguy LE CARROUR, Ludovic Courtès; +Cc: 54090

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

Tanguy LE CARROUR schreef op zo 06-03-2022 om 19:40 [+0100]:
> ```
> ERROR: In procedure %resolve-variable:
> Unbound variable: gexp

Replace the quasiquote (`) by 'list' and import (guix gexp):

(package
  ...
  (arguments
    (list #:builder
          #~(foo bar ...))))

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

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

* [bug#54090] [PATCH v2] gnu: Add tessen.
  2022-02-21 17:43 [bug#54090] [PATCH 0/2] gnu: Add tessen Tanguy Le Carrour
  2022-02-21 18:33 ` [bug#54090] [PATCH 1/2] gnu: Add wtype Tanguy Le Carrour
@ 2022-03-10  6:53 ` Tanguy Le Carrour
  2022-03-10 18:56   ` Nicolas Goaziou
  2022-03-11  7:54 ` [bug#54090] [PATCH v3] " Tanguy Le Carrour
  2 siblings, 1 reply; 17+ messages in thread
From: Tanguy Le Carrour @ 2022-03-10  6:53 UTC (permalink / raw)
  To: 54090; +Cc: Tanguy Le Carrour, ludo, maximedevos

* gnu/packages/password-utils.scm (tessen): New variable.
---
 gnu/packages/password-utils.scm | 36 ++++++++++++++++++++++++++++++++-
 1 file changed, 35 insertions(+), 1 deletion(-)

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")
-- 
2.34.0





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

* [bug#54090] [PATCH v2] gnu: Add tessen.
  2022-03-10  6:53 ` [bug#54090] [PATCH v2] " Tanguy Le Carrour
@ 2022-03-10 18:56   ` Nicolas Goaziou
  2022-03-11  7:52     ` Tanguy LE CARROUR
  0 siblings, 1 reply; 17+ messages in thread
From: Nicolas Goaziou @ 2022-03-10 18:56 UTC (permalink / raw)
  To: Tanguy Le Carrour; +Cc: 54090, ludo, maximedevos

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,
-- 
Nicolas Goaziou




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

* [bug#54090] [PATCH v2] gnu: Add tessen.
  2022-03-10 18:56   ` Nicolas Goaziou
@ 2022-03-11  7:52     ` Tanguy LE CARROUR
  0 siblings, 0 replies; 17+ messages in thread
From: Tanguy LE CARROUR @ 2022-03-11  7:52 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: 54090, ludo, maximedevos

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,

-- 
Tanguy




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

* [bug#54090] [PATCH v3] gnu: Add tessen.
  2022-02-21 17:43 [bug#54090] [PATCH 0/2] gnu: Add tessen Tanguy Le Carrour
  2022-02-21 18:33 ` [bug#54090] [PATCH 1/2] gnu: Add wtype Tanguy Le Carrour
  2022-03-10  6:53 ` [bug#54090] [PATCH v2] " Tanguy Le Carrour
@ 2022-03-11  7:54 ` Tanguy Le Carrour
  2022-03-16 14:45   ` bug#54090: [PATCH 0/2] " Ludovic Courtès
  2022-03-25 15:10   ` [bug#54090] [PATCH v3] " Andrew Tropin
  2 siblings, 2 replies; 17+ messages in thread
From: Tanguy Le Carrour @ 2022-03-11  7:54 UTC (permalink / raw)
  To: 54090; +Cc: Tanguy Le Carrour, ludo, maximedevos, mail

* gnu/packages/password-utils.scm (tessen): New variable.
---
 gnu/packages/password-utils.scm | 38 ++++++++++++++++++++++++++++++++-
 1 file changed, 37 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/password-utils.scm b/gnu/packages/password-utils.scm
index 440bb927a6..0e5f63e1be 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>
@@ -56,6 +56,7 @@ (define-module (gnu packages password-utils)
   #:use-module (guix build-system go)
   #:use-module (guix build-system trivial)
   #:use-module (guix download)
+  #:use-module (guix gexp)
   #:use-module (guix git-download)
   #:use-module (guix packages)
   #:use-module (gnu packages)
@@ -736,6 +737,41 @@ (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
+     (list #:tests?
+           #f ;no tests
+           #:phases
+           #~(modify-phases %standard-phases
+               (add-after 'unpack 'patch-wtype-path
+                 (lambda* (#:key inputs #:allow-other-keys)
+                   (substitute* "tessen"
+                     (("wtype") (search-input-file inputs "/bin/wtype")))))
+               (delete 'configure)) ;no configure script
+           #:make-flags
+           #~(list (string-append "PREFIX="
+                                  #$output))))
+    (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")
-- 
2.34.0





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

* bug#54090: [PATCH 0/2] gnu: Add tessen.
  2022-03-11  7:54 ` [bug#54090] [PATCH v3] " Tanguy Le Carrour
@ 2022-03-16 14:45   ` Ludovic Courtès
  2022-03-16 15:01     ` [bug#54090] " Tanguy LE CARROUR
  2022-03-25 15:10   ` [bug#54090] [PATCH v3] " Andrew Tropin
  1 sibling, 1 reply; 17+ messages in thread
From: Ludovic Courtès @ 2022-03-16 14:45 UTC (permalink / raw)
  To: Tanguy Le Carrour; +Cc: 54090-done, maximedevos, mail

Hi,

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

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

Applied.  Thank you, and thanks to the reviewers!

Ludo’.




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

* [bug#54090] [PATCH 0/2] gnu: Add tessen.
  2022-03-16 14:45   ` bug#54090: [PATCH 0/2] " Ludovic Courtès
@ 2022-03-16 15:01     ` Tanguy LE CARROUR
  0 siblings, 0 replies; 17+ messages in thread
From: Tanguy LE CARROUR @ 2022-03-16 15:01 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 54090-done, maximedevos, mail

Hi,


Quoting Ludovic Courtès (2022-03-16 15:45:35)
> Tanguy Le Carrour <tanguy@bioneland.org> skribis:
> 
> > * gnu/packages/password-utils.scm (tessen): New variable.
> 
> Applied.  Thank you, and thanks to the reviewers!

Thank you, in deed!

-- 
Tanguy




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

* [bug#54090] [PATCH v3] gnu: Add tessen.
  2022-03-11  7:54 ` [bug#54090] [PATCH v3] " Tanguy Le Carrour
  2022-03-16 14:45   ` bug#54090: [PATCH 0/2] " Ludovic Courtès
@ 2022-03-25 15:10   ` Andrew Tropin
  2022-03-25 16:22     ` Tanguy LE CARROUR
  1 sibling, 1 reply; 17+ messages in thread
From: Andrew Tropin @ 2022-03-25 15:10 UTC (permalink / raw)
  To: Tanguy Le Carrour, 54090; +Cc: maximedevos, ludo, Tanguy Le Carrour, mail

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

On 2022-03-11 08:54, Tanguy Le Carrour wrote:

> * gnu/packages/password-utils.scm (tessen): New variable.
> ---
>  gnu/packages/password-utils.scm | 38 ++++++++++++++++++++++++++++++++-
>  1 file changed, 37 insertions(+), 1 deletion(-)
>
> diff --git a/gnu/packages/password-utils.scm b/gnu/packages/password-utils.scm
> index 440bb927a6..0e5f63e1be 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>
> @@ -56,6 +56,7 @@ (define-module (gnu packages password-utils)
>    #:use-module (guix build-system go)
>    #:use-module (guix build-system trivial)
>    #:use-module (guix download)
> +  #:use-module (guix gexp)
>    #:use-module (guix git-download)
>    #:use-module (guix packages)
>    #:use-module (gnu packages)
> @@ -736,6 +737,41 @@ (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
> +     (list #:tests?
> +           #f ;no tests
> +           #:phases
> +           #~(modify-phases %standard-phases
> +               (add-after 'unpack 'patch-wtype-path
> +                 (lambda* (#:key inputs #:allow-other-keys)
> +                   (substitute* "tessen"
> +                     (("wtype") (search-input-file inputs "/bin/wtype")))))
> +               (delete 'configure)) ;no configure script
> +           #:make-flags
> +           #~(list (string-append "PREFIX="
> +                                  #$output))))
> +    (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")

Sorry, for comming up late, but the path to wl-copy binary should be
hardcoded as well.

/gnu/store/f48prcjwpw8wrfz0srjf096a9s8fja2w-profile/bin/tessen: line 476: wl-copy: command not found

-- 
Best regards,
Andrew Tropin

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 853 bytes --]

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

* [bug#54090] [PATCH v3] gnu: Add tessen.
  2022-03-25 15:10   ` [bug#54090] [PATCH v3] " Andrew Tropin
@ 2022-03-25 16:22     ` Tanguy LE CARROUR
  2022-03-25 17:14       ` Andrew Tropin
  0 siblings, 1 reply; 17+ messages in thread
From: Tanguy LE CARROUR @ 2022-03-25 16:22 UTC (permalink / raw)
  To: 54090, Andrew Tropin; +Cc: ludo, maximedevos, mail

Hi Andrew,


Quoting Andrew Tropin (2022-03-25 16:10:25)
> On 2022-03-11 08:54, Tanguy Le Carrour wrote:
> 
> > * gnu/packages/password-utils.scm (tessen): New variable.
> > […]
> > +    (arguments
> > +     (list #:tests?
> > +           #f ;no tests
> > +           #:phases
> > +           #~(modify-phases %standard-phases
> > +               (add-after 'unpack 'patch-wtype-path
> > +                 (lambda* (#:key inputs #:allow-other-keys)
> > +                   (substitute* "tessen"
> > +                     (("wtype") (search-input-file inputs "/bin/wtype")))))
> > +               (delete 'configure)) ;no configure script
> > +           #:make-flags
> > +           #~(list (string-append "PREFIX="
> > […]
> 
> Sorry, for comming up late, but the path to wl-copy binary should be
> hardcoded as well.
> 
> /gnu/store/f48prcjwpw8wrfz0srjf096a9s8fja2w-profile/bin/tessen: line 476: wl-copy: command not found

Oh, my bad! I'm not using the "copy to clipboard" feature. Fortunatly,
the patch is trivial. But, before submitting it, I have a question!…

Why not also add as inputs and substitute `pass`, `gopass`, `wofi`,
`notify-send`, `xdg-open`… that are also used by tessen?!

Regards,

-- 
Tanguy




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

* [bug#54090] [PATCH v3] gnu: Add tessen.
  2022-03-25 16:22     ` Tanguy LE CARROUR
@ 2022-03-25 17:14       ` Andrew Tropin
  2022-03-29  7:45         ` Tanguy LE CARROUR
  0 siblings, 1 reply; 17+ messages in thread
From: Andrew Tropin @ 2022-03-25 17:14 UTC (permalink / raw)
  To: Tanguy LE CARROUR, 54090; +Cc: ludo, maximedevos, mail

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

On 2022-03-25 17:22, Tanguy LE CARROUR wrote:

> Hi Andrew,
>
>
> Quoting Andrew Tropin (2022-03-25 16:10:25)
>> On 2022-03-11 08:54, Tanguy Le Carrour wrote:
>> 
>> > * gnu/packages/password-utils.scm (tessen): New variable.
>> > […]
>> > +    (arguments
>> > +     (list #:tests?
>> > +           #f ;no tests
>> > +           #:phases
>> > +           #~(modify-phases %standard-phases
>> > +               (add-after 'unpack 'patch-wtype-path
>> > +                 (lambda* (#:key inputs #:allow-other-keys)
>> > +                   (substitute* "tessen"
>> > +                     (("wtype") (search-input-file inputs "/bin/wtype")))))
>> > +               (delete 'configure)) ;no configure script
>> > +           #:make-flags
>> > +           #~(list (string-append "PREFIX="
>> > […]
>> 
>> Sorry, for comming up late, but the path to wl-copy binary should be
>> hardcoded as well.
>> 
>> /gnu/store/f48prcjwpw8wrfz0srjf096a9s8fja2w-profile/bin/tessen: line 476: wl-copy: command not found
>
> Oh, my bad! I'm not using the "copy to clipboard" feature. Fortunatly,
> the patch is trivial. But, before submitting it, I have a question!…
>
> Why not also add as inputs and substitute `pass`, `gopass`, `wofi`,

We can't hardcode pass, because it's an optional dependency with
explicit alternative and user can prefer gopass, so we keep tessen to
use the first option available in $PATH and fail if there is no pass or
gopass available.

The same for rofi, fuzzel, bemenu, wofi, dmenu.  Due to design of tessen
we can't know "compile time", which one will be used.

> `notify-send`, `xdg-open`… that are also used by tessen?!

IMO, notify-send and xdg-open are good candidates for inclusion to
inputs.

-- 
Best regards,
Andrew Tropin

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 853 bytes --]

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

* [bug#54090] [PATCH v3] gnu: Add tessen.
  2022-03-25 17:14       ` Andrew Tropin
@ 2022-03-29  7:45         ` Tanguy LE CARROUR
  0 siblings, 0 replies; 17+ messages in thread
From: Tanguy LE CARROUR @ 2022-03-29  7:45 UTC (permalink / raw)
  To: 54090, Andrew Tropin; +Cc: ludo, maximedevos, mail

Hi Andrew,


Quoting Andrew Tropin (2022-03-25 18:14:17)
> > Quoting Andrew Tropin (2022-03-25 16:10:25)
> >> On 2022-03-11 08:54, Tanguy Le Carrour wrote:
> >> 
> >> > * gnu/packages/password-utils.scm (tessen): New variable.
> >> > […]
> >> > +    (arguments
> >> > +     (list #:tests?
> >> > +           #f ;no tests
> >> > +           #:phases
> >> > +           #~(modify-phases %standard-phases
> >> > +               (add-after 'unpack 'patch-wtype-path
> >> > +                 (lambda* (#:key inputs #:allow-other-keys)
> >> > +                   (substitute* "tessen"
> >> > +                     (("wtype") (search-input-file inputs "/bin/wtype")))))
> >> > +               (delete 'configure)) ;no configure script
> >> > +           #:make-flags
> >> > +           #~(list (string-append "PREFIX="
> >> > […]
> >> 
> >> Sorry, for comming up late, but the path to wl-copy binary should be
> >> hardcoded as well.
> >> 
> >> /gnu/store/f48prcjwpw8wrfz0srjf096a9s8fja2w-profile/bin/tessen: line 476: wl-copy: command not found
> >
> > Oh, my bad! I'm not using the "copy to clipboard" feature. Fortunatly,
> > the patch is trivial. But, before submitting it, I have a question!…
> >
> > Why not also add as inputs and substitute `pass`, `gopass`, `wofi`,
> 
> We can't hardcode pass, because it's an optional dependency with
> explicit alternative and user can prefer gopass, so we keep tessen to
> use the first option available in $PATH and fail if there is no pass or
> gopass available.
> 
> The same for rofi, fuzzel, bemenu, wofi, dmenu.  Due to design of tessen
> we can't know "compile time", which one will be used.
> 
> > `notify-send`, `xdg-open`… that are also used by tessen?!
> 
> IMO, notify-send and xdg-open are good candidates for inclusion to
> inputs.

It would make sense, indeed! I'm submitting a patch using the same bug ID.

Cheers,

-- 
Tanguy




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

end of thread, other threads:[~2022-03-29  7:46 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-21 17:43 [bug#54090] [PATCH 0/2] gnu: Add tessen Tanguy Le Carrour
2022-02-21 18:33 ` [bug#54090] [PATCH 1/2] gnu: Add wtype Tanguy Le Carrour
2022-02-21 18:33   ` [bug#54090] [PATCH 2/2] gnu: Add tessen Tanguy Le Carrour
2022-03-03 22:30     ` [bug#54090] [PATCH 0/2] " Ludovic Courtès
2022-03-06 18:40       ` Tanguy LE CARROUR
2022-03-06 19:33         ` Maxime Devos
2022-03-03 22:28   ` Ludovic Courtès
2022-03-10  6:53 ` [bug#54090] [PATCH v2] " Tanguy Le Carrour
2022-03-10 18:56   ` Nicolas Goaziou
2022-03-11  7:52     ` Tanguy LE CARROUR
2022-03-11  7:54 ` [bug#54090] [PATCH v3] " Tanguy Le Carrour
2022-03-16 14:45   ` bug#54090: [PATCH 0/2] " Ludovic Courtès
2022-03-16 15:01     ` [bug#54090] " Tanguy LE CARROUR
2022-03-25 15:10   ` [bug#54090] [PATCH v3] " Andrew Tropin
2022-03-25 16:22     ` Tanguy LE CARROUR
2022-03-25 17:14       ` Andrew Tropin
2022-03-29  7:45         ` Tanguy LE CARROUR

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