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