13 , withIntrospection ? lib.meta.availableOn stdenv.hostPlatform gobject-introspection && stdenv.hostPlatform.emulatorAvailable buildPackages
15 , gobject-introspection
22 stdenv.mkDerivation rec {
26 outputs = [ "out" "dev" "installedTests" ]
27 ++ lib.optional withIntrospection "devdoc";
30 url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
31 sha256 = "G8qNZtlhBuzBR98xM7laW7eE8fpvFdBt18Go+0oQr3s=";
35 # Add option for changing installation path of installed tests.
36 ./meson-add-installed-tests-prefix-option.patch
38 # Restore single quote string extension
39 # https://gitlab.gnome.org/GNOME/json-glib/-/issues/76
41 url = "https://gitlab.gnome.org/GNOME/json-glib/-/commit/2a26bd3dedc3b27471e6df210d76333d3d41159c.patch";
42 hash = "sha256-U/jWB4wneN4MwZO3vAfI9Z7UT/SLMNEx/X8NMsCO8I4=";
53 docutils # for rst2man, rst2html5
60 ] ++ lib.optionals stdenv.hostPlatform.isDarwin [
62 ] ++ lib.optionals withIntrospection [
65 ] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
69 propagatedBuildInputs = [
74 "-Dinstalled_test_prefix=${placeholder "installedTests"}"
75 (lib.mesonEnable "introspection" withIntrospection)
76 (lib.mesonEnable "documentation" withIntrospection)
82 # Move developer documentation to devdoc output.
83 # Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back.
84 if [[ -d "$out/share/doc" ]]; then
85 find -L "$out/share/doc" -type f -regex '.*\.devhelp2?' -print0 \
86 | while IFS= read -r -d ''' file; do
87 moveToOutput "$(dirname "''${file/"$out/"/}")" "$devdoc"
94 installedTests = nixosTests.installed-tests.json-glib;
97 updateScript = gnome.updateScript {
99 versionPolicy = "odd-unstable";
104 description = "Library providing (de)serialization support for the JavaScript Object Notation (JSON) format";
105 homepage = "https://gitlab.gnome.org/GNOME/json-glib";
106 license = licenses.lgpl21Plus;
107 maintainers = teams.gnome.members;
108 platforms = with platforms; unix;