vuls: init at 0.27.0 (#348530)
[NixPkgs.git] / pkgs / by-name / gn / gnome-weather / package.nix
blobd593124ab7edb81afbe062f653afa52abc85c532
2   lib,
3   stdenv,
4   fetchurl,
5   desktop-file-utils,
6   pkg-config,
7   gnome,
8   adwaita-icon-theme,
9   gtk4,
10   libadwaita,
11   wrapGAppsHook4,
12   gjs,
13   gobject-introspection,
14   libgweather,
15   meson,
16   ninja,
17   geoclue2,
18   python3,
19   gsettings-desktop-schemas,
22 stdenv.mkDerivation rec {
23   pname = "gnome-weather";
24   version = "46.0";
26   src = fetchurl {
27     url = "mirror://gnome/sources/gnome-weather/${lib.versions.major version}/gnome-weather-${version}.tar.xz";
28     hash = "sha256-FTgmcFzPZy4U8v5N/Hgvjom3xMvkqv6VpVMvveej1J0=";
29   };
31   nativeBuildInputs = [
32     desktop-file-utils
33     pkg-config
34     meson
35     ninja
36     wrapGAppsHook4
37     python3
38     gobject-introspection
39     gjs
40   ];
42   buildInputs = [
43     gtk4
44     libadwaita
45     gjs
46     libgweather
47     adwaita-icon-theme
48     geoclue2
49     gsettings-desktop-schemas
50   ];
52   postPatch = ''
53     # The .service file is not wrapped with the correct environment
54     # so misses GIR files when started. By re-pointing from the gjs
55     # entry point to the wrapped binary we get back to a wrapped
56     # binary.
57     substituteInPlace "data/org.gnome.Weather.service.in" \
58         --replace "Exec=@DATA_DIR@/@APP_ID@" \
59                   "Exec=$out/bin/gnome-weather"
61     chmod +x meson_post_install.py
62     patchShebangs meson_post_install.py
63   '';
65   passthru = {
66     updateScript = gnome.updateScript { packageName = "gnome-weather"; };
67   };
69   meta = with lib; {
70     homepage = "https://apps.gnome.org/Weather/";
71     description = "Access current weather conditions and forecasts";
72     mainProgram = "gnome-weather";
73     maintainers = teams.gnome.members;
74     license = licenses.gpl2Plus;
75     platforms = platforms.unix;
76   };