nixpkgs/pkgs/development/libraries/json-glib/default.nix

78 lines
1.6 KiB
Nix
Raw Normal View History

{ lib
, stdenv
, fetchurl
, glib
, meson
, ninja
, pkg-config
, gettext
, withIntrospection ? stdenv.buildPlatform == stdenv.hostPlatform
, gobject-introspection
, fixDarwinDylibNames
, gtk-doc
, docbook-xsl-nons
, docbook_xml_dtd_43
, gnome
}:
stdenv.mkDerivation rec {
2018-05-31 18:14:38 +01:00
pname = "json-glib";
version = "1.6.2";
outputs = [ "out" "dev" ]
++ lib.optional withIntrospection "devdoc";
2015-04-05 06:22:12 +01:00
src = fetchurl {
url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
sha256 = "092g2dyy1hhl0ix9kp33wcab0pg1qicnsv0cj5ms9g9qs336cgd3";
};
strictDeps = true;
depsBuildBuild = [
pkg-config
];
nativeBuildInputs = [
meson
ninja
pkg-config
gettext
glib
docbook-xsl-nons
docbook_xml_dtd_43
] ++ lib.optional stdenv.hostPlatform.isDarwin [
fixDarwinDylibNames
] ++ lib.optionals withIntrospection [
gobject-introspection
gtk-doc
];
propagatedBuildInputs = [
glib
];
2016-12-09 14:47:12 +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 = {
updateScript = gnome.updateScript {
2018-05-31 18:14:38 +01:00
packageName = pname;
versionPolicy = "odd-unstable";
2018-05-31 18:14:38 +01:00
};
};
meta = with lib; {
description = "A library providing (de)serialization support for the JavaScript Object Notation (JSON) format";
homepage = "https://wiki.gnome.org/Projects/JsonGlib";
license = licenses.lgpl21Plus;
maintainers = teams.gnome.members;
platforms = with platforms; unix;
};
}