2021-03-20 23:47:42 -07:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
, pkg-config
|
2021-05-07 14:18:14 -07:00
|
|
|
, gnome
|
2021-03-20 23:47:42 -07:00
|
|
|
, gtk3
|
|
|
|
, libhandy
|
|
|
|
, wrapGAppsHook
|
|
|
|
, gjs
|
|
|
|
, gobject-introspection
|
|
|
|
, libgweather
|
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, geoclue2
|
|
|
|
, gnome-desktop
|
|
|
|
, python3
|
|
|
|
, gsettings-desktop-schemas
|
|
|
|
}:
|
2016-09-18 12:35:23 -07:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 05:41:18 -07:00
|
|
|
pname = "gnome-weather";
|
2021-03-20 23:47:42 -07:00
|
|
|
version = "40.0";
|
2018-02-25 12:07:20 -08:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-03-20 23:47:42 -07:00
|
|
|
url = "mirror://gnome/sources/gnome-weather/${lib.versions.major version}/${pname}-${version}.tar.xz";
|
|
|
|
sha256 = "1vxfcvga5waangq3rzwdrdxyy5sw40vv0l463lc651s0n8xafd9a";
|
2018-02-25 12:07:20 -08:00
|
|
|
};
|
|
|
|
|
2021-03-20 23:47:42 -07:00
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
wrapGAppsHook
|
|
|
|
python3
|
|
|
|
];
|
|
|
|
|
2016-09-18 12:35:23 -07:00
|
|
|
buildInputs = [
|
2021-03-20 23:47:42 -07:00
|
|
|
gtk3
|
|
|
|
libhandy
|
|
|
|
gjs
|
|
|
|
gobject-introspection
|
|
|
|
gnome-desktop
|
|
|
|
libgweather
|
2021-05-07 14:18:14 -07:00
|
|
|
gnome.adwaita-icon-theme
|
2021-03-20 23:47:42 -07:00
|
|
|
geoclue2
|
|
|
|
gsettings-desktop-schemas
|
2016-09-18 12:35:23 -07:00
|
|
|
];
|
|
|
|
|
2019-03-03 10:56:08 -08: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@" \
|
2017-06-25 09:59:23 -07:00
|
|
|
"Exec=$out/bin/gnome-weather"
|
2019-03-03 10:56:08 -08:00
|
|
|
|
|
|
|
chmod +x meson_post_install.py
|
|
|
|
patchShebangs meson_post_install.py
|
2017-06-25 09:59:23 -07:00
|
|
|
'';
|
|
|
|
|
2018-03-14 13:53:34 -07:00
|
|
|
passthru = {
|
2021-05-07 14:18:14 -07:00
|
|
|
updateScript = gnome.updateScript {
|
2018-03-14 13:53:34 -07:00
|
|
|
packageName = "gnome-weather";
|
2021-05-07 14:18:14 -07:00
|
|
|
attrPath = "gnome.gnome-weather";
|
2018-03-14 13:53:34 -07:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2021-01-10 23:54:33 -08:00
|
|
|
meta = with lib; {
|
2020-03-31 18:11:51 -07:00
|
|
|
homepage = "https://wiki.gnome.org/Apps/Weather";
|
2016-09-18 12:35:23 -07:00
|
|
|
description = "Access current weather conditions and forecasts";
|
2020-04-01 05:40:51 -07:00
|
|
|
maintainers = teams.gnome.members;
|
2016-09-18 12:35:23 -07:00
|
|
|
license = licenses.gpl2;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|