1 { lib, stdenv, fetchurl, python3, installShellFiles }:
3 stdenv.mkDerivation rec {
8 url = "http://fungi.yuggoth.org/weather/src/${pname}-${version}.tar.xz";
9 sha256 = "sha256-qJl5rFDk31Fm+tmR6+Iiihcx6qyd9alHz2L672pNJsc=";
14 python3.pkgs.wrapPython
20 # Upstream doesn't provide a setup.py or alike, so we follow:
21 # http://fungi.yuggoth.org/weather/doc/install.rst#id3
23 site_packages=$out/${python3.sitePackages}
24 install -Dt $out/bin -m 755 weather
25 install -Dt $site_packages weather.py
26 install -Dt $out/share/weather-util \
27 airports overrides.{conf,log} places slist stations \
29 install -Dt $out/etc weatherrc
32 -e "s|/etc|$out/etc|g" \
33 -e "s|else: default_setpath = \".:~/.weather|&:$out/share/weather-util|" \
34 $site_packages/weather.py
38 installManPage weather.1 weatherrc.5
42 homepage = "http://fungi.yuggoth.org/weather";
43 description = "Quick access to current weather conditions and forecasts";
44 license = licenses.isc;
45 maintainers = [ maintainers.matthiasbeyer ];
46 platforms = platforms.unix;