about summary refs log tree commit diff
path: root/pkgs/desktops/gnome-3/apps/gnome-weather/default.nix
blob: a82f075f5731096e6913c9f3f65e6a9bf123bcd3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
{ stdenv, fetchurl, pkgconfig, gnome3, gtk3, wrapGAppsHook, gjs
, libgweather, intltool, itstool, geoclue2 }:

stdenv.mkDerivation rec {
  inherit (import ./src.nix fetchurl) name src;

  nativeBuildInputs = [ pkgconfig ];
  buildInputs = [
    gtk3 wrapGAppsHook gjs intltool itstool
    libgweather gnome3.defaultIconTheme geoclue2 gnome3.gsettings-desktop-schemas
  ];

  # The .service file isn't 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.
  preConfigure = ''
    substituteInPlace "data/org.gnome.Weather.Application.service.in" \
        --replace "Exec=@pkgdatadir@/@PACKAGE_NAME@.Application" \
                  "Exec=$out/bin/gnome-weather"
  '';

  meta = with stdenv.lib; {
    homepage = https://wiki.gnome.org/Apps/Weather;
    description = "Access current weather conditions and forecasts";
    maintainers = gnome3.maintainers;
    license = licenses.gpl2;
    platforms = platforms.linux;
  };
}