2021-05-20 23:08:51 +00:00
|
|
|
|
{ lib
|
|
|
|
|
, stdenv
|
|
|
|
|
, fetchurl
|
|
|
|
|
, meson
|
|
|
|
|
, ninja
|
|
|
|
|
, pkg-config
|
|
|
|
|
, libxml2
|
|
|
|
|
, glib
|
|
|
|
|
, gettext
|
|
|
|
|
, libsoup
|
2022-03-30 09:31:56 +00:00
|
|
|
|
, gi-docgen
|
2021-05-20 23:08:51 +00:00
|
|
|
|
, gobject-introspection
|
|
|
|
|
, python3
|
|
|
|
|
, tzdata
|
|
|
|
|
, geocode-glib
|
|
|
|
|
, vala
|
|
|
|
|
, gnome
|
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
|
pname = "libgweather";
|
2022-03-30 09:31:56 +00:00
|
|
|
|
version = "4.0.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
|
|
outputs = [ "out" "dev" "devdoc" ];
|
|
|
|
|
|
|
|
|
|
src = fetchurl {
|
2022-03-30 09:31:56 +00:00
|
|
|
|
url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
|
|
|
|
|
sha256 = "RA1EgBtvcrSMZ25eN/kQnP7hOU/XTMknJeGxuk+ug0w=";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
};
|
|
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
|
patches = [
|
|
|
|
|
# Headers depend on glib but it is only listed in Requires.private,
|
|
|
|
|
# which does not influence Cflags on non-static builds in nixpkgs’s
|
|
|
|
|
# pkg-config. Let’s add it to Requires to ensure Cflags are set correctly.
|
|
|
|
|
./fix-pkgconfig.patch
|
|
|
|
|
];
|
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
|
nativeBuildInputs = [
|
|
|
|
|
meson
|
|
|
|
|
ninja
|
|
|
|
|
pkg-config
|
|
|
|
|
gettext
|
|
|
|
|
vala
|
2022-03-30 09:31:56 +00:00
|
|
|
|
gi-docgen
|
2021-05-20 23:08:51 +00:00
|
|
|
|
gobject-introspection
|
|
|
|
|
python3
|
|
|
|
|
python3.pkgs.pygobject3
|
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
|
buildInputs = [
|
|
|
|
|
glib
|
|
|
|
|
libsoup
|
|
|
|
|
libxml2
|
|
|
|
|
geocode-glib
|
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
|
|
mesonFlags = [
|
|
|
|
|
"-Dzoneinfo_dir=${tzdata}/share/zoneinfo"
|
|
|
|
|
"-Denable_vala=true"
|
|
|
|
|
"-Dgtk_doc=true"
|
|
|
|
|
];
|
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
|
postPatch = ''
|
2022-03-30 09:31:56 +00:00
|
|
|
|
patchShebangs build-aux/meson/meson_post_install.py
|
|
|
|
|
patchShebangs build-aux/meson/gen_locations_variant.py
|
|
|
|
|
'';
|
|
|
|
|
|
|
|
|
|
postFixup = ''
|
|
|
|
|
# Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back.
|
|
|
|
|
moveToOutput "share/doc" "$devdoc"
|
2021-05-20 23:08:51 +00:00
|
|
|
|
'';
|
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
|
passthru = {
|
2021-05-20 23:08:51 +00:00
|
|
|
|
updateScript = gnome.updateScript {
|
2020-04-24 23:36:52 +00:00
|
|
|
|
packageName = pname;
|
2021-05-20 23:08:51 +00:00
|
|
|
|
versionPolicy = "odd-unstable";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
|
description = "A library to access weather information from online services for numerous locations";
|
|
|
|
|
homepage = "https://wiki.gnome.org/Projects/LibGWeather";
|
|
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
|
maintainers = teams.gnome.members;
|
2022-08-12 12:06:08 +00:00
|
|
|
|
platforms = platforms.unix;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
};
|
|
|
|
|
}
|