2021-05-20 23:08:51 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
2024-01-02 11:29:13 +00:00
|
|
|
, desktop-file-utils
|
2021-05-20 23:08:51 +00:00
|
|
|
, pkg-config
|
|
|
|
, gnome
|
2024-07-27 06:49:29 +00:00
|
|
|
, adwaita-icon-theme
|
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";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "46.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";
|
2024-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-FTgmcFzPZy4U8v5N/Hgvjom3xMvkqv6VpVMvveej1J0=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
nativeBuildInputs = [
|
2024-01-02 11:29:13 +00:00
|
|
|
desktop-file-utils
|
2021-05-20 23:08:51 +00:00
|
|
|
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
|
2024-07-27 06:49:29 +00:00
|
|
|
adwaita-icon-theme
|
2021-05-20 23:08:51 +00:00
|
|
|
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; {
|
2024-05-15 15:35:15 +00:00
|
|
|
homepage = "https://apps.gnome.org/Weather/";
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Access current weather conditions and forecasts";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "gnome-weather";
|
2020-04-24 23:36:52 +00:00
|
|
|
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
|
|
|
};
|
|
|
|
}
|