| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 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
|
| 63 | forecast for one or seven days. Displayed information includes temperature
|
| 64 | range---felt and measured---, wind speed and direction, viewing distance,
|
| 65 | precipitation 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 |
| 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 | |
| 100 | |
| 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
|
| 114 | weather: it can display the weather condition, temperature, humidity, etc.
|
| 115 |
|
| 116 | To use it, you must first run:
|
| 117 |
|
| 118 | @example
|
| 119 | export 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 |
| 141 | #:phases
|
| 142 | #~(modify-phases %standard-phases
|
| 143 | (add-before 'build 'remove-translations
|
| 144 | (lambda _
|
| 145 | |
| 146 | |
| 147 | |
| 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
|
| 157 | panels, desktop notifications and its own window. Weather information is
|
| 158 | retrieved from OpenWeatherMap.")
|
| 159 | (license license:gpl3)))
|