GNU bug report logs - #28693
[PATCH] gnu: Add missing input to python-py3status.

Previous Next

Package: guix-patches;

Reported by: Tomáš Čech <sleep_walker <at> gnu.org>

Date: Tue, 3 Oct 2017 22:59:01 UTC

Severity: normal

Tags: patch

Done: Tomáš Čech <sleep_walker <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Tomáš Čech <sleep_walker <at> gnu.org>
To: Christopher Baines <mail <at> cbaines.net>
Cc: Tomáš Čech <sleep_walker <at> gnu.org>, 28693 <at> debbugs.gnu.org
Subject: [bug#28693] [PATCH] gnu: Add missing input to python-py3status and fix call path.
Date: Thu,  5 Oct 2017 23:24:39 +0200
* gnu/packages/python.scm (python-py3status)[inputs, arguments]: Add missing
  file utility as input, adjust path used to call it.

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
-- 
2.14.2





This bug report was last modified 7 years and 289 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.