2021-05-20 23:08:51 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
, pkg-config
|
|
|
|
, gnome
|
2022-03-30 09:31:56 +00:00
|
|
|
, gtk4
|
|
|
|
, libadwaita
|
2022-10-21 18:38:19 +00:00
|
|
|
, wrapGAppsHook4
|
2021-05-20 23:08:51 +00:00
|
|
|
, gjs
|
|
|
|
, gobject-introspection
|
|
|
|
, libgweather
|
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, geoclue2
|
|
|
|
, python3
|
|
|
|
, gsettings-desktop-schemas
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "gnome-weather";
|
2022-10-21 18:38:19 +00:00
|
|
|
version = "43.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";
|
2022-10-21 18:38:19 +00:00
|
|
|
sha256 = "LxERf3VVK/G7ngHwHPs8L82mo/aQcP/gUZoHYVMrjyY=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
|
|
|
meson
|
|
|
|
ninja
|
2022-10-21 18:38:19 +00:00
|
|
|
wrapGAppsHook4
|
2021-05-20 23:08:51 +00:00
|
|
|
python3
|
2022-09-30 11:47:45 +00:00
|
|
|
gobject-introspection
|
|
|
|
gjs
|
2021-05-20 23:08:51 +00:00
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = [
|
2022-03-30 09:31:56 +00:00
|
|
|
gtk4
|
|
|
|
libadwaita
|
2021-05-20 23:08:51 +00:00
|
|
|
gjs
|
|
|
|
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
|
2022-10-21 18:38:19 +00:00
|
|
|
substituteInPlace meson_post_install.py \
|
|
|
|
--replace gtk-update-icon-cache gtk4-update-icon-cache
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
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;
|
2022-03-30 09:31:56 +00:00
|
|
|
license = licenses.gpl2Plus;
|
2022-10-21 18:38:19 +00:00
|
|
|
platforms = platforms.unix;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|