Re-Revert Merge #184360: json-glib: add installed tests
This reverts commit 78182194c6
.
This commit is contained in:
parent
24f129d6fd
commit
3bd6484563
|
@ -98,6 +98,7 @@ in
|
||||||
gnome-photos = callInstalledTest ./gnome-photos.nix {};
|
gnome-photos = callInstalledTest ./gnome-photos.nix {};
|
||||||
graphene = callInstalledTest ./graphene.nix {};
|
graphene = callInstalledTest ./graphene.nix {};
|
||||||
gsconnect = callInstalledTest ./gsconnect.nix {};
|
gsconnect = callInstalledTest ./gsconnect.nix {};
|
||||||
|
json-glib = callInstalledTest ./json-glib.nix {};
|
||||||
ibus = callInstalledTest ./ibus.nix {};
|
ibus = callInstalledTest ./ibus.nix {};
|
||||||
libgdata = callInstalledTest ./libgdata.nix {};
|
libgdata = callInstalledTest ./libgdata.nix {};
|
||||||
librsvg = callInstalledTest ./librsvg.nix {};
|
librsvg = callInstalledTest ./librsvg.nix {};
|
||||||
|
|
5
nixos/tests/installed-tests/json-glib.nix
Normal file
5
nixos/tests/installed-tests/json-glib.nix
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
{ pkgs, makeInstalledTest, ... }:
|
||||||
|
|
||||||
|
makeInstalledTest {
|
||||||
|
tested = pkgs.json-glib;
|
||||||
|
}
|
|
@ -4,6 +4,7 @@
|
||||||
, glib
|
, glib
|
||||||
, meson
|
, meson
|
||||||
, ninja
|
, ninja
|
||||||
|
, nixosTests
|
||||||
, pkg-config
|
, pkg-config
|
||||||
, gettext
|
, gettext
|
||||||
, gobject-introspection
|
, gobject-introspection
|
||||||
|
@ -17,13 +18,18 @@ stdenv.mkDerivation rec {
|
||||||
pname = "json-glib";
|
pname = "json-glib";
|
||||||
version = "1.6.6";
|
version = "1.6.6";
|
||||||
|
|
||||||
outputs = [ "out" "dev" "devdoc" ];
|
outputs = [ "out" "dev" "devdoc" "installedTests" ];
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
|
url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
|
||||||
sha256 = "luyYvnqR9t3jNjZyDj2i/27LuQ52zKpJSX8xpoVaSQ4=";
|
sha256 = "luyYvnqR9t3jNjZyDj2i/27LuQ52zKpJSX8xpoVaSQ4=";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
# Add option for changing installation path of installed tests.
|
||||||
|
./meson-add-installed-tests-prefix-option.patch
|
||||||
|
];
|
||||||
|
|
||||||
strictDeps = true;
|
strictDeps = true;
|
||||||
|
|
||||||
depsBuildBuild = [
|
depsBuildBuild = [
|
||||||
|
@ -49,6 +55,9 @@ stdenv.mkDerivation rec {
|
||||||
glib
|
glib
|
||||||
];
|
];
|
||||||
|
|
||||||
|
mesonFlags = [
|
||||||
|
"-Dinstalled_test_prefix=${placeholder "installedTests"}"
|
||||||
|
];
|
||||||
|
|
||||||
# Run-time dependency gi-docgen found: NO (tried pkgconfig and cmake)
|
# Run-time dependency gi-docgen found: NO (tried pkgconfig and cmake)
|
||||||
# it should be a build-time dep for build
|
# it should be a build-time dep for build
|
||||||
|
@ -73,6 +82,10 @@ stdenv.mkDerivation rec {
|
||||||
'';
|
'';
|
||||||
|
|
||||||
passthru = {
|
passthru = {
|
||||||
|
tests = {
|
||||||
|
installedTests = nixosTests.installed-tests.json-glib;
|
||||||
|
};
|
||||||
|
|
||||||
updateScript = gnome.updateScript {
|
updateScript = gnome.updateScript {
|
||||||
packageName = pname;
|
packageName = pname;
|
||||||
versionPolicy = "odd-unstable";
|
versionPolicy = "odd-unstable";
|
||||||
|
|
|
@ -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 = join_paths(json_libexecdir, 'installed-tests', json_api_name)
|
||||||
|
-installed_test_datadir = join_paths(json_datadir, 'installed-tests', json_api_name)
|
||||||
|
+installed_test_prefix = get_option('installed_test_prefix')
|
||||||
|
+installed_test_bindir = join_paths(installed_test_prefix, 'libexec', 'installed-tests', json_api_name)
|
||||||
|
+installed_test_datadir = join_paths(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 068a03f..03f398a 100644
|
||||||
|
--- a/meson_options.txt
|
||||||
|
+++ b/meson_options.txt
|
||||||
|
@@ -10,3 +10,6 @@ option('man',
|
||||||
|
option('tests',
|
||||||
|
type: 'boolean', value: true,
|
||||||
|
description: 'Build the tests')
|
||||||
|
+option('installed_test_prefix',
|
||||||
|
+ description: 'Prefix for installed tests',
|
||||||
|
+ type: 'string')
|
Loading…
Reference in a new issue