push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
diff --git a/json-glib/tests/meson.build b/json-glib/tests/meson.build
index 1eb56c8..dca444e 100644
--- a/json-glib/tests/meson.build
+++ b/json-glib/tests/meson.build
@@ -21,8 +21,9 @@ test_data = [
'stream-load.json',
]
-installed_test_bindir = json_libexecdir / 'installed-tests' / json_api_name
-installed_test_datadir = json_datadir / 'installed-tests' / json_api_name
+installed_test_prefix = get_option('installed_test_prefix')
+installed_test_bindir = installed_test_prefix / 'libexec' / 'installed-tests' / json_api_name
+installed_test_datadir = installed_test_prefix / 'share' / 'installed-tests' / json_api_name
install_data(test_data, install_dir: installed_test_bindir)
diff --git a/meson_options.txt b/meson_options.txt
index 5a96998..383aa6c 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -13,3 +13,6 @@ option('tests',
option('installed_tests',
type: 'boolean', value: true,
description: 'Enable installed tests')
+option('installed_test_prefix',
+ description: 'Prefix for installed tests',
+ type: 'string')

View File

@@ -0,0 +1,112 @@
{
lib,
stdenv,
fetchurl,
docutils,
glib,
meson,
mesonEmulatorHook,
ninja,
nixosTests,
pkg-config,
gettext,
withIntrospection ?
lib.meta.availableOn stdenv.hostPlatform gobject-introspection
&& stdenv.hostPlatform.emulatorAvailable buildPackages,
buildPackages,
gobject-introspection,
gi-docgen,
libxslt,
fixDarwinDylibNames,
gnome,
}:
stdenv.mkDerivation rec {
pname = "json-glib";
version = "1.10.8";
outputs = [
"out"
"dev"
"installedTests"
]
++ lib.optional withIntrospection "devdoc";
src = fetchurl {
url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
hash = "sha256-VcXBQaVkJFuPj752mGY8h6RaczPCosVvBvgRq3OyEt0=";
};
patches = [
# Add option for changing installation path of installed tests.
./meson-add-installed-tests-prefix-option.patch
];
strictDeps = true;
depsBuildBuild = [
pkg-config
];
nativeBuildInputs = [
docutils # for rst2man, rst2html5
meson
ninja
pkg-config
gettext
glib
libxslt
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
fixDarwinDylibNames
]
++ lib.optionals withIntrospection [
gobject-introspection
gi-docgen
]
++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
mesonEmulatorHook
];
propagatedBuildInputs = [
glib
];
mesonFlags = [
"-Dinstalled_test_prefix=${placeholder "installedTests"}"
(lib.mesonEnable "introspection" withIntrospection)
(lib.mesonEnable "documentation" withIntrospection)
];
doCheck = true;
postFixup = ''
# Move developer documentation to devdoc output.
# Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back.
if [[ -d "$out/share/doc" ]]; then
find -L "$out/share/doc" -type f -regex '.*\.devhelp2?' -print0 \
| while IFS= read -r -d ''' file; do
moveToOutput "$(dirname "''${file/"$out/"/}")" "$devdoc"
done
fi
'';
passthru = {
tests = {
installedTests = nixosTests.installed-tests.json-glib;
};
updateScript = gnome.updateScript {
packageName = pname;
versionPolicy = "odd-unstable";
};
};
meta = with lib; {
description = "Library providing (de)serialization support for the JavaScript Object Notation (JSON) format";
homepage = "https://gitlab.gnome.org/GNOME/json-glib";
license = licenses.lgpl21Plus;
teams = [ teams.gnome ];
platforms = with platforms; unix;
};
}