weather: reformat derivation
This commit is contained in:
parent
748aa38cb1
commit
271b9ac9a7
|
@ -1,41 +1,41 @@
|
||||||
{ stdenv, fetchurl, pythonPackages }:
|
{ stdenv, fetchurl, pythonPackages }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
version = "2.4.1";
|
version = "2.4.1";
|
||||||
pname = "weather";
|
pname = "weather";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "http://fungi.yuggoth.org/weather/src/${pname}-${version}.tar.xz";
|
url = "http://fungi.yuggoth.org/weather/src/${pname}-${version}.tar.xz";
|
||||||
sha256 = "0nf680dl7a2vlgavdhj6ljq8a7lkhvr6zghkpzad53vmilxsndys";
|
sha256 = "0nf680dl7a2vlgavdhj6ljq8a7lkhvr6zghkpzad53vmilxsndys";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ pythonPackages.wrapPython ];
|
nativeBuildInputs = [ pythonPackages.wrapPython ];
|
||||||
|
|
||||||
buildInputs = [ pythonPackages.python ];
|
buildInputs = [ pythonPackages.python ];
|
||||||
|
|
||||||
phases = [ "unpackPhase" "installPhase" ];
|
phases = [ "unpackPhase" "installPhase" ];
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
site_packages=$out/${pythonPackages.python.sitePackages}
|
site_packages=$out/${pythonPackages.python.sitePackages}
|
||||||
mkdir -p $out/{share/{man,weather-util},bin,etc} $site_packages
|
mkdir -p $out/{share/{man,weather-util},bin,etc} $site_packages
|
||||||
cp weather $out/bin/
|
cp weather $out/bin/
|
||||||
cp weather.py $site_packages/
|
cp weather.py $site_packages/
|
||||||
chmod +x $out/bin/weather
|
chmod +x $out/bin/weather
|
||||||
cp airports overrides.{conf,log} places slist stations zctas zlist zones $out/share/weather-util/
|
cp airports overrides.{conf,log} places slist stations zctas zlist zones $out/share/weather-util/
|
||||||
cp weatherrc $out/etc
|
cp weatherrc $out/etc
|
||||||
cp weather.1 weatherrc.5 $out/share/man/
|
cp weather.1 weatherrc.5 $out/share/man/
|
||||||
sed -i \
|
sed -i \
|
||||||
-e "s|/etc|$out/etc|g" \
|
-e "s|/etc|$out/etc|g" \
|
||||||
-e "s|else: default_setpath = \".:~/.weather|&:$out/share/weather-util|" \
|
-e "s|else: default_setpath = \".:~/.weather|&:$out/share/weather-util|" \
|
||||||
$site_packages/weather.py
|
$site_packages/weather.py
|
||||||
wrapPythonPrograms
|
wrapPythonPrograms
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
homepage = "http://fungi.yuggoth.org/weather";
|
homepage = "http://fungi.yuggoth.org/weather";
|
||||||
description = "Quick access to current weather conditions and forecasts";
|
description = "Quick access to current weather conditions and forecasts";
|
||||||
license = licenses.isc;
|
license = licenses.isc;
|
||||||
maintainers = [ maintainers.matthiasbeyer ];
|
maintainers = [ maintainers.matthiasbeyer ];
|
||||||
platforms = platforms.linux ++ platforms.darwin;
|
platforms = platforms.linux ++ platforms.darwin;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue