2021-05-20 23:08:51 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
, pkg-config
|
|
|
|
, gnome
|
2022-03-30 09:31:56 +00:00
|
|
|
, gtk4
|
|
|
|
, libadwaita
|
2021-05-20 23:08:51 +00:00
|
|
|
, wrapGAppsHook
|
|
|
|
, 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-03-30 09:31:56 +00:00
|
|
|
version = "42.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-03-30 09:31:56 +00:00
|
|
|
sha256 = "V57mkdhT5bs/9Q6Me0P4Wundfls6ZJ4CwlSi2bgHtGU=";
|
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 = [
|
2022-03-30 09:31:56 +00:00
|
|
|
gtk4
|
|
|
|
libadwaita
|
2021-05-20 23:08:51 +00:00
|
|
|
gjs
|
|
|
|
gobject-introspection
|
|
|
|
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;
|
2022-03-30 09:31:56 +00:00
|
|
|
license = licenses.gpl2Plus;
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|