2021-05-20 23:08:51 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
, pkg-config
|
|
|
|
, gnome
|
|
|
|
, gtk3
|
|
|
|
, libhandy
|
|
|
|
, wrapGAppsHook
|
|
|
|
, gjs
|
|
|
|
, gobject-introspection
|
|
|
|
, libgweather
|
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, geoclue2
|
|
|
|
, gnome-desktop
|
|
|
|
, python3
|
|
|
|
, gsettings-desktop-schemas
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "gnome-weather";
|
2021-10-14 00:43:12 +00:00
|
|
|
version = "41.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-05-20 23:08:51 +00:00
|
|
|
url = "mirror://gnome/sources/gnome-weather/${lib.versions.major version}/${pname}-${version}.tar.xz";
|
2021-10-14 00:43:12 +00:00
|
|
|
sha256 = "1vidwq768xnrnr24jcfbpwjczz7vm5zmaiv41nb75q4p8avlwqg5";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
wrapGAppsHook
|
|
|
|
python3
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = [
|
2021-05-20 23:08:51 +00:00
|
|
|
gtk3
|
|
|
|
libhandy
|
|
|
|
gjs
|
|
|
|
gobject-introspection
|
|
|
|
gnome-desktop
|
|
|
|
libgweather
|
|
|
|
gnome.adwaita-icon-theme
|
|
|
|
geoclue2
|
|
|
|
gsettings-desktop-schemas
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
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 = {
|
2021-05-20 23:08:51 +00:00
|
|
|
updateScript = gnome.updateScript {
|
2020-04-24 23:36:52 +00:00
|
|
|
packageName = "gnome-weather";
|
2021-05-20 23:08:51 +00:00
|
|
|
attrPath = "gnome.gnome-weather";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://wiki.gnome.org/Apps/Weather";
|
|
|
|
description = "Access current weather conditions and forecasts";
|
|
|
|
maintainers = teams.gnome.members;
|
|
|
|
license = licenses.gpl2;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|