Subject: [bug#54090] [PATCH v3] gnu: Add tessen.

From: Andrew Tropin <[email-masked]>
Date: Fri, 25 Mar 2022 20:14:17 +0300

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