projects/guix·blob javascript-team · refs

159 lines · 6.0 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2022 Petr Hodina <[email protected]>
3;;; Copyright © 2022, 2024 Nicolas Goaziou <[email protected]>
4;;; Copyright © 2024 Leo Famulari <[email protected]>
5;;; Copyright © 2025 Andrew Wong <[email protected]>
6;;; Copyright © 2025 Nicolas Graves <[email protected]>
7;;;
8;;; This file is part of GNU Guix.
9;;;
10;;; GNU Guix is free software; you can redistribute it and/or modify it
11;;; under the terms of the GNU General Public License as published by
12;;; the Free Software Foundation; either version 3 of the License, or (at
13;;; your option) any later version.
14;;;
15;;; GNU Guix is distributed in the hope that it will be useful, but
16;;; WITHOUT ANY WARRANTY; without even the implied warranty of
17;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18;;; GNU General Public License for more details.
19;;;
20;;; You should have received a copy of the GNU General Public License
21;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
22
23(define-module (gnu packages weather)
24 #:use-module ((guix licenses) #:prefix license:)
25 #:use-module (guix build-system go)
26 #:use-module (guix build-system pyproject)
27 #:use-module (guix gexp)
28 #:use-module (guix git-download)
29 #:use-module (guix packages)
30 #:use-module (gnu packages)
31 #:use-module (gnu packages golang-build)
32 #:use-module (gnu packages golang-xyz)
33 #:use-module (gnu packages python-build)
34 #:use-module (gnu packages python-web)
35 #:use-module (gnu packages python-xyz)
36 #:use-module (gnu packages qt)
37 #:use-module (gnu packages xml))
38
39(define-public wego
40 (package
41 (name "wego")
42 (version "2.4")
43 (source
44 (origin
45 (method git-fetch)
46 (uri (git-reference
47 (url "https://github.com/schachmat/wego")
48 (commit version)))
49 (file-name (git-file-name name version))
50 (sha256
51 (base32 "1p1a7lfa26rfjz2j3x8izsdwncsfac2zizl63n9lay1s0cx5b9a4"))))
52 (build-system go-build-system)
53 (arguments '(#:import-path "github.com/schachmat/wego"))
54 (native-inputs
55 (list go-github-com-mattn-go-colorable
56 go-github-com-mattn-go-runewidth
57 go-github-com-muesli-mango
58 go-github-com-muesli-roff
59 go-github-com-schachmat-ingo))
60 (home-page "https://github.com/schachmat/wego")
61 (synopsis "Weather client for the terminal")
62 (description "Wego is a weather client for the terminal. It shows
63forecast for one or seven days. Displayed information includes temperature
64range---felt and measured---, wind speed and direction, viewing distance,
65precipitation amount and probability.")
66 (license license:isc)))
67
68(define-public wfetch
69 (let ((commit "e1cfa37814aebc9eb56ce994ebe877b6a6f9a715")
70 (revision "2"))
71 (package
72 (name "wfetch")
73 (version (git-version "0.1-pre" revision commit))
74 (home-page "https://github.com/Gcat101/Wfetch")
75 (source
76 (origin
77 (method git-fetch)
78 (uri (git-reference
79 (url home-page)
80 (commit commit)))
81 (file-name (git-file-name name version))
82 (sha256
83 (base32 "1dmr85plx8zr6s14ym3r32g6crwxghkval5a24ah90ijx4dbn5q5"))))
84 (build-system pyproject-build-system)
85 (arguments
86 (list
87 #:tests? #f ;no test suite
88 #:phases
89 #~(modify-phases %standard-phases
90 (delete 'build)
91 (replace 'install
92 (lambda _
93 (let ((bin (string-append #$output "/bin"))
94 (share (string-append #$output "/share")))
95 (mkdir-p share)
96 (substitute* "wfetch/wfetch.py"
97 (("os.sep, 'opt', 'wfetch'")
98 (string-append "'" share "'")))
99 ;; The documentation expects the executable to be named
100 ;; 'wfetch', not 'wfetch.py'.
101 (rename-file "wfetch/wfetch.py" "wfetch/wfetch")
102 (install-file "wfetch/wfetch" bin)
103 (copy-recursively "wfetch/icons" share)))))))
104 (native-inputs
105 (list python-setuptools))
106 (inputs
107 (list python-pyowm
108 python-fire
109 python-termcolor
110 python-requests))
111 (synopsis "Command-line tool to display weather info")
112 (description
113 "This package provides a tool similar to Neofetch/pfetch, but for
114weather: it can display the weather condition, temperature, humidity, etc.
115
116To use it, you must first run:
117
118@example
119export WEATHER_CLI_API=@var{your OpenWeatherMap API key}
120@end example
121")
122 (license license:gpl3+))))
123
124(define-public meteo-qt
125 (package
126 (name "meteo-qt")
127 (version "4.3")
128 (source
129 (origin
130 (method git-fetch)
131 (uri (git-reference
132 (url "https://github.com/dglent/meteo-qt")
133 (commit (string-append "v" version))))
134 (file-name (git-file-name name version))
135 (sha256
136 (base32 "1dl2hykd1fijp504j50yqafwzf7c3rn53gij1c789zsmfmrbkhcj"))))
137 (build-system pyproject-build-system)
138 (arguments
139 (list
140 #:tests? #f ; No tests.
141 #:phases
142 #~(modify-phases %standard-phases
143 (add-before 'build 'remove-translations
144 (lambda _
145 ;; Translation processing is broken because Guix thinks lprodump
146 ;; is in qtbase, not qttools. So, we'll skip it and exclude
147 ;; qttools from the native input list until it is fixed.
148 (substitute* "setup.py"
149 (("/usr") #$output)
150 (("^.+lrelease-pro-qt6.+$") "")
151 (("^.+meteo_qt/translations.+$") "")))))))
152 (propagated-inputs (list python-lxml python-pyqt-6))
153 (home-page "https://github.com/dglent/meteo-qt")
154 (synopsis "Weather application for the system tray")
155 (description
156 "meteo-qt is an application to display weather information in desktop
157panels, desktop notifications and its own window. Weather information is
158retrieved from OpenWeatherMap.")
159 (license license:gpl3)))