2021-02-10 22:56:25 +01:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
, glib
|
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, pkg-config
|
|
|
|
, gettext
|
2021-03-19 11:38:29 +01:00
|
|
|
, withIntrospection ? stdenv.buildPlatform == stdenv.hostPlatform
|
2021-02-10 22:56:25 +01:00
|
|
|
, gobject-introspection
|
|
|
|
, fixDarwinDylibNames
|
|
|
|
, gtk-doc
|
|
|
|
, docbook-xsl-nons
|
|
|
|
, docbook_xml_dtd_43
|
2021-05-07 23:18:14 +02:00
|
|
|
, gnome
|
2018-01-30 22:03:43 +01:00
|
|
|
}:
|
2010-09-27 13:18:28 +02:00
|
|
|
|
2021-02-10 22:56:25 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2018-05-31 19:14:38 +02:00
|
|
|
pname = "json-glib";
|
2021-02-10 22:56:25 +01:00
|
|
|
version = "1.6.2";
|
|
|
|
|
2021-03-19 11:38:29 +01:00
|
|
|
outputs = [ "out" "dev" ]
|
|
|
|
++ lib.optional withIntrospection "devdoc";
|
2010-09-27 13:18:28 +02:00
|
|
|
|
2015-04-05 07:22:12 +02:00
|
|
|
src = fetchurl {
|
2021-02-10 22:56:25 +01:00
|
|
|
url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
|
|
|
|
sha256 = "092g2dyy1hhl0ix9kp33wcab0pg1qicnsv0cj5ms9g9qs336cgd3";
|
2010-09-27 13:18:28 +02:00
|
|
|
};
|
|
|
|
|
2021-03-19 11:38:29 +01:00
|
|
|
strictDeps = true;
|
|
|
|
|
|
|
|
depsBuildBuild = [
|
|
|
|
pkg-config
|
|
|
|
];
|
|
|
|
|
2021-02-10 22:56:25 +01:00
|
|
|
nativeBuildInputs = [
|
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
pkg-config
|
|
|
|
gettext
|
|
|
|
glib
|
|
|
|
docbook-xsl-nons
|
|
|
|
docbook_xml_dtd_43
|
|
|
|
] ++ lib.optional stdenv.hostPlatform.isDarwin [
|
|
|
|
fixDarwinDylibNames
|
2021-03-19 11:38:29 +01:00
|
|
|
] ++ lib.optionals withIntrospection [
|
|
|
|
gobject-introspection
|
|
|
|
gtk-doc
|
2021-02-10 22:56:25 +01:00
|
|
|
];
|
2010-09-27 13:18:28 +02:00
|
|
|
|
2021-02-10 22:56:25 +01:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
glib
|
|
|
|
];
|
2016-12-09 15:47:12 +01:00
|
|
|
|
2021-03-19 11:38:29 +01:00
|
|
|
mesonFlags = lib.optionals (!withIntrospection) [
|
|
|
|
"-Dintrospection=disabled"
|
|
|
|
# doc gen uses introspection, doesn't work properly
|
|
|
|
"-Dgtk_doc=disabled"
|
|
|
|
];
|
|
|
|
|
2017-10-12 23:30:40 +02:00
|
|
|
doCheck = true;
|
|
|
|
|
2018-05-31 19:14:38 +02:00
|
|
|
passthru = {
|
2021-05-07 23:18:14 +02:00
|
|
|
updateScript = gnome.updateScript {
|
2018-05-31 19:14:38 +02:00
|
|
|
packageName = pname;
|
2021-03-21 00:57:24 +01:00
|
|
|
versionPolicy = "odd-unstable";
|
2018-05-31 19:14:38 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2021-01-21 18:00:13 +01:00
|
|
|
meta = with lib; {
|
2010-09-27 13:18:28 +02:00
|
|
|
description = "A library providing (de)serialization support for the JavaScript Object Notation (JSON) format";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://wiki.gnome.org/Projects/JsonGlib";
|
2021-02-10 22:56:25 +01:00
|
|
|
license = licenses.lgpl21Plus;
|
|
|
|
maintainers = teams.gnome.members;
|
2016-08-02 19:50:55 +02:00
|
|
|
platforms = with platforms; unix;
|
2010-09-27 13:18:28 +02:00
|
|
|
};
|
|
|
|
}
|