3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/desktops/gnome-3/apps/gnome-weather/default.nix
Tor Hedin Brønner c53f331a78
gnome3.gnome-weather: 3.26.0 -> 3.32.0
- port to meson
- service files are now build correctly upstream
2019-04-05 11:40:30 +02:00

47 lines
1.5 KiB
Nix

{ stdenv, fetchurl, pkgconfig, gnome3, gtk3, wrapGAppsHook, gjs, gobject-introspection
, libgweather, meson, ninja, geoclue2, gnome-desktop, python3 }:
stdenv.mkDerivation rec {
name = "gnome-weather-${version}";
version = "3.32.0";
src = fetchurl {
url = "mirror://gnome/sources/gnome-weather/${stdenv.lib.versions.majorMinor version}/${name}.tar.xz";
sha256 = "0b7cqd3wfrgm0hps0cb8vhjz0bpjw955hbc4r82l626g8l3hf86w";
};
nativeBuildInputs = [ pkgconfig meson ninja wrapGAppsHook python3 ];
buildInputs = [
gtk3 gjs gobject-introspection gnome-desktop
libgweather gnome3.adwaita-icon-theme geoclue2 gnome3.gsettings-desktop-schemas
];
postPatch = ''
# The .service file is not wrapped with the correct environment
# so misses GIR files when started. By re-pointing from the gjs
# entry point to the wrapped binary we get back to a wrapped
# binary.
substituteInPlace "data/org.gnome.Weather.service.in" \
--replace "Exec=@DATA_DIR@/@APP_ID@" \
"Exec=$out/bin/gnome-weather"
chmod +x meson_post_install.py
patchShebangs meson_post_install.py
'';
passthru = {
updateScript = gnome3.updateScript {
packageName = "gnome-weather";
attrPath = "gnome3.gnome-weather";
};
};
meta = with stdenv.lib; {
homepage = https://wiki.gnome.org/Apps/Weather;
description = "Access current weather conditions and forecasts";
maintainers = gnome3.maintainers;
license = licenses.gpl2;
platforms = platforms.linux;
};
}