unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Christopher Baines <mail@cbaines.net>
To: "Tomáš Čech" <sleep_walker@gnu.org>
Cc: 28693@debbugs.gnu.org
Subject: [bug#28693] [PATCH] gnu: Add missing input to python-py3status and fix call path.
Date: Fri, 6 Oct 2017 07:32:50 +0100	[thread overview]
Message-ID: <20171006073250.4ecbd100@cbaines.net> (raw)
In-Reply-To: <20171005212439.26407-1-sleep_walker@gnu.org>

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

On Thu,  5 Oct 2017 23:24:39 +0200
Tomáš Čech <sleep_walker@gnu.org> wrote:

> * gnu/packages/python.scm (python-py3status)[inputs, arguments]: Add
> missing file utility as input, adjust path used to call it.

I would usually put the changelog last, as I think this is more
consistent with other committers. Also, maybe this could be more
specific like:

    * gnu/packages/python.scm (python-py3status)[inputs]: Add file.
      [arguments]: Modify phases to patch py3status to call file with an
      absolute path.

> file is used to determine configuration file encoding and py3status
> fails to start when this tool is missing.
> ---
>  gnu/packages/python.scm | 15 ++++++++++++++-
>  1 file changed, 14 insertions(+), 1 deletion(-)
> 
> diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
> index 6ffd468b3..426ff12eb 100644
> --- a/gnu/packages/python.scm
> +++ b/gnu/packages/python.scm
> @@ -11468,8 +11468,21 @@ to occurrences in strings and comments.")
>          (base32
>           "0i283z1pivmir61z8kbiycigc94l61v33ygzkhczf1ifq7cppyds"))))
>      (build-system python-build-system)
> +    (inputs
> +     `(("file" ,file)))
>      (arguments
> -     '(#:tests? #f)) ; TODO: Requires many libraries not in Guix.
> +     '(#:phases
> +       (modify-phases %standard-phases
> +         ;; 'file' is used for detection of configuration file
> encoding
> +         ;; let's make link the dependency to particular input
> +         (add-before 'build 'patch-file-path
> +           (lambda* (#:key inputs #:allow-other-keys)
> +             (let ((file-path (assoc-ref inputs "file")))
> +               (substitute* "py3status/parse_config.py"
> +                 (("check_output\\(\\['file'")
> +                  (string-append "check_output(['" file-path
> "/bin/file'")))
> +               #t))))
> +       #:tests? #f)) ; TODO: Requires many libraries not in Guix.
>      (home-page "https://github.com/ultrabug/py3status")
>      (synopsis "Extensible i3status wrapper written in Python")
>      (description "py3status is an i3status wrapper which extends
> i3status

This change looks fine to me, and I checked that it builds as well.
Please push :)

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 963 bytes --]

  parent reply	other threads:[~2017-10-06  6:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-03 22:57 [bug#28693] [PATCH] gnu: Add missing input to python-py3status Tomáš Čech
2017-10-04  6:59 ` Christopher Baines
2017-10-05 21:08   ` Tomáš Čech
2017-10-06  6:29     ` Christopher Baines
2017-10-05 21:24   ` [bug#28693] [PATCH] gnu: Add missing input to python-py3status and fix call path Tomáš Čech
2017-10-05 22:22     ` Marius Bakke
2017-10-06  6:32     ` Christopher Baines [this message]
2017-10-08 11:05       ` bug#28693: " Tomáš Čech

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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=20171006073250.4ecbd100@cbaines.net \
    --to=mail@cbaines.net \
    --cc=28693@debbugs.gnu.org \
    --cc=sleep_walker@gnu.org \
    /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 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).