summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetr Hodina <phodina@protonmail.com>2022-01-11 11:29:23 +0100
committerLudovic Courtès <ludo@gnu.org>2022-01-28 23:51:09 +0100
commit27c1d58d901dcf48929bcb6f76d861fc21575dbf (patch)
tree40f4ab6c979301128b5398e85866c047d2b6198c
parentc9c8d75f977d5a8ce8e5969a46e210a5c8b6244c (diff)
downloadguix-patches-27c1d58d901dcf48929bcb6f76d861fc21575dbf.tar
guix-patches-27c1d58d901dcf48929bcb6f76d861fc21575dbf.tar.gz
gnu: Add wfetch.
* gnu/packages/python-xyz.scm (wfetch): New variable. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
-rw-r--r--gnu/packages/python-xyz.scm45
1 files changed, 45 insertions, 0 deletions
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index fc1ff5c80d..aab8b27eef 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -11664,6 +11664,51 @@ Python code formatter \"black\".")
structures.")
(license license:bsd-3)))
+(define-public wfetch
+ (let ((commit "e1cfa37814aebc9eb56ce994ebe877b6a6f9a715")
+ (revision "1"))
+ (package
+ (name "wfetch")
+ (version (git-version "0.1-pre" revision commit))
+ (home-page "https://github.com/Gcat101/Wfetch")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference (url home-page)
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1dmr85plx8zr6s14ym3r32g6crwxghkval5a24ah90ijx4dbn5q5"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:use-setuptools? #f ; no setup.py
+ #:tests? #f ; no test suite
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'build)
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bin (string-append out "/bin"))
+ (share (string-append out "/share")))
+ (mkdir-p share)
+ (substitute* "wfetch/wfetch.py"
+ (("os.sep, 'opt', 'wfetch'") (string-append "'" share "'")))
+ (install-file "wfetch/wfetch.py" bin)
+ (copy-recursively "wfetch/icons" share)))))))
+ (inputs (list python-pyowm python-fire python-termcolor python-requests))
+ (synopsis "Command-line tool to display weather info")
+ (description
+ "This package provides a tool similar to Neofetch/pfetch, but for
+weather: it can display the weather condition, temperature, humidity, etc.
+
+To use it, you must first run:
+
+@example
+export WEATHER_CLI_API=@var{your OpenWeatherMap API key}
+@end example\n")
+ (license license:gpl3+))))
+
(define-public python-get-version
(package
(name "python-get-version")