all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Sarah Morgensen <iskarian@mgsn.dev>
To: jgart <jgart@dismail.de>
Cc: 50833@debbugs.gnu.org
Subject: [bug#50833] [PATCH] gnu: Add bower.
Date: Sun, 26 Sep 2021 18:01:20 -0700	[thread overview]
Message-ID: <864ka6vnkv.fsf@mgsn.dev> (raw)
In-Reply-To: <20210926231145.18651-1-jgart@dismail.de> (jgart@dismail.de's message of "Sun, 26 Sep 2021 19:11:45 -0400 (1 hour, 17 minutes, 31 seconds ago)")

Hi,

Thanks for the patch.  I don't use notmuch (yet) but I test-built this
and I have a few suggestions :)

jgart <jgart@dismail.de> writes:

> * gnu/packages/mail.scm (bower): New variable.
> ---
>  gnu/packages/mail.scm | 54 +++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 54 insertions(+)
>
> diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm
> index b3bdf13537..f0624c12c4 100644
> --- a/gnu/packages/mail.scm
> +++ b/gnu/packages/mail.scm
> @@ -87,6 +87,7 @@
>    #:use-module (gnu packages file)
>    #:use-module (gnu packages fontutils)
>    #:use-module (gnu packages freedesktop)
> +  #:use-module (gnu packages gawk)
>    #:use-module (gnu packages gdb)
>    #:use-module (gnu packages gettext)
>    #:use-module (gnu packages ghostscript)
> @@ -114,6 +115,7 @@
>    #:use-module (gnu packages lua)
>    #:use-module (gnu packages m4)
>    #:use-module (gnu packages man)
> +  #:use-module (gnu packages mercury)
>    #:use-module (gnu packages ncurses)
>    #:use-module (gnu packages nettle)
>    #:use-module (gnu packages networking)
> @@ -1302,6 +1304,58 @@ agent (@dfn{MUA}) experience as an alternative to the Emacs mode shipped with
>  Notmuch.")
>      (license license:gpl3+)))
>  
> +(define-public bower
> +  (package
> +    (name "bower")
> +    (version "0.13")
> +    (home-page "https://github.com/wangp/bower")
> +    (source
> +     (origin
> +       (method git-fetch)
> +       (uri
> +        (git-reference
> +         (url home-page)
> +         (commit (string-append version))))
> +       (file-name (git-file-name name version))
> +       (sha256
> +        (base32 "0r5s16pc3ym5nd33lv9ljv1p1gpb7yysrdni4g7w7yvjrnwk35l6"))))
> +    (build-system gnu-build-system)
> +    (arguments
> +     `(#:make-flags
> +       (list
> +        "bower" "man"
> +        (string-append "CC=" ,(cc-for-target))
> +        (string-append "prefix=" %output))
> +       #:phases
> +       (modify-phases %standard-phases
> +         (delete 'configure)
> +         (replace 'check
> +           (lambda* (#:key inputs outputs tests? #:allow-other-keys)
> +             (when tests?
> +               (chdir "tests")
> +               (invoke "make"))))

Rather than chdir, you can just

  (invoke "make" "-C" "tests")

or maybe even avoid the custom phase with test-target:

  #:test-target "--directory=tests"

(Yes, it's a bit of a cheat, but test-target is just passed as the first
argument to make, and we want the default target anyway, so it works.)

> +         (replace 'install
> +           (lambda* (#:key outpus #:allow-other-keys)
> +             (let ((bin (string-append (assoc-ref %outputs "out") "/bin"))
> +                   (man (string-append (assoc-ref %outputs "out") "/share/man/man1")))
> +               (chdir "..")
> +               (install-file "bower" bin)
> +               (install-file "bower.1" man)))))))

It might be helpful to also install bower.conf.sample to "/share/bower",
so we have an example config file.

> +    (native-inputs
> +     `(("diffutils" ,diffutils) ; needed for diff command
> +       ("gawk" ,gawk)
> +       ("mercury" ,mercury)
> +       ("pandoc" ,pandoc)
> +       ("util-linux" ,util-linux))) ; needed by rev command for test_process.m
> +    (inputs
> +     `(("gpgme" ,gpgme)
> +       ("ncurses" ,ncurses)))

The README says that it also uses "base64" from coreutils, "file", and
optionally "lynx"; a grep through the source shows the following
commands used (some of them are just defaults):

base64
file

vi (used if EDITOR is not set)
lynx (used for formatting HTML messages)
xdg-open (used for opening links and MIME parts)
xclip
pandoc (used for composing multipart/alternative messages)
/usr/bin/sendmail

Other than "base64" and "file" I'm not sure which (if any) of these
should be directly linked.  "/usr/bin/sendmail" should be "sendmail" if
it's not linked, though.  "xdg-open" and "xclip" aren't available from
my PATH, but they are configurable in bower.conf, so... yeah, I'm not
sure.  Just know that without changing the bower.conf value or
installing "xdg-open", links won't open automatically.  Same for the
clipboard and reading/composing HTML messages.

If it's not possible to 'substitute*' those values, 'wrap-program' could
be used to add the correct directories to PATH, but that can introduce
other issues.

> +    (synopsis "Terminal client for the notmuch email system")
> +    (description
> +"@command{bower} is a curses frontend for the notmuch email system.
> +@command{bower} is written in mercury.")

Could you expand the description a bit, perhaps with some of the
features you quoted in your first email?  It also seems that
configurability (seen above) is another of its draws, so maybe mention
that as well :)

(Also, in my opinion "written in X" isn't relevant for end-user
packages, but I know others who would disagree, so...)

> +    (license license:gpl3+)))
> +
>  (define-public notifymuch
>    (let
>        ((commit "9d4aaf54599282ce80643b38195ff501120807f0")

Thanks again for your work! 

--
Sarah




  reply	other threads:[~2021-09-27  1:02 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-26 23:08 [bug#50833] Add bower (it's not what you're thinking) jgart via Guix-patches via
2021-09-26 23:11 ` [bug#50833] [PATCH] gnu: Add bower jgart via Guix-patches via
2021-09-27  1:01   ` Sarah Morgensen [this message]
2021-09-29  1:12     ` jgart via Guix-patches via
2021-10-01  2:11       ` Sarah Morgensen
2021-10-01  3:31         ` jgart via Guix-patches via
2021-10-02  7:58         ` jgart via Guix-patches via
2021-10-25  4:32         ` jgart via Guix-patches via
2021-10-25 12:25           ` [bug#50833] Add bower (it's not what you're thinking) Ludovic Courtès
2022-04-20 21:07             ` [bug#50833] [PATCH] Add Bower (notmuch curses email client) Maxim Cournoyer
2022-05-05 14:31               ` jgart via Guix-patches via
2022-07-07 18:01                 ` Maxim Cournoyer
2022-07-08  0:23                   ` jgart via Guix-patches via
2022-07-08 10:33                     ` Munyoki Kilyungi
2022-07-08 18:47                       ` jgart via Guix-patches via
2022-07-08 19:42                         ` jgart via Guix-patches via
2022-07-14  8:54                           ` Munyoki Kilyungi
2022-07-11 16:09                     ` Maxim Cournoyer
2022-07-15  1:50                       ` jgart via Guix-patches via
2021-09-29  1:12 ` [bug#50833] [PATCH] gnu: Add bower jgart via Guix-patches via
2021-10-01  3:31 ` jgart via Guix-patches via
2022-07-20  5:18 ` [bug#50833] [PATCH v2] " jgart via Guix-patches via
2022-07-20 11:59   ` Maxime Devos
2022-07-24 17:45     ` jgart via Guix-patches via
2022-08-21  6:53 ` [bug#50833] [PATCH v3] " jgart via Guix-patches via
2022-09-02 14:05 ` bug#50833: [PATCH] Add Bower (notmuch curses email client) Maxim Cournoyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=864ka6vnkv.fsf@mgsn.dev \
    --to=iskarian@mgsn.dev \
    --cc=50833@debbugs.gnu.org \
    --cc=jgart@dismail.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.