about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/gjs/installed-tests-path.patch
blob: f9b1515b68e347d06ef38ac35d118ed2ab4ca23b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
diff --git a/installed-tests/meson.build b/installed-tests/meson.build
index 7e842025..1e5029e0 100644
--- a/installed-tests/meson.build
+++ b/installed-tests/meson.build
@@ -1,7 +1,7 @@
 ### Installed tests ############################################################
 
-installed_tests_execdir = get_option('prefix') / pkglibexecdir / 'installed-tests'
-installed_tests_metadir = abs_datadir / 'installed-tests' / meson.project_name()
+installed_tests_execdir = get_option('installed_test_prefix') / 'libexec' / meson.project_name() / 'installed-tests'
+installed_tests_metadir = get_option('installed_test_prefix') / 'share' / 'installed-tests' / meson.project_name()
 
 # Simple shell script tests #
 
diff --git a/meson.build b/meson.build
index 084d5396..e5d73fcd 100644
--- a/meson.build
+++ b/meson.build
@@ -540,7 +540,7 @@ install_data('installed-tests/extra/lsan.supp',
     install_dir: get_option('datadir') / api_name / 'lsan')
 
 if get_option('installed_tests')
-    schemadir = abs_datadir / 'glib-2.0' / 'schemas'
+    schemadir = get_option('installed_test_prefix') / 'share' / 'glib-2.0' / 'schemas'
     install_data('installed-tests/js/org.gnome.GjsTest.gschema.xml', install_dir: schemadir)
     meson.add_install_script('build/compile-gschemas.py', schemadir)
 endif
diff --git a/meson_options.txt b/meson_options.txt
index 66f66024..008687cb 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -25,3 +25,5 @@ option('skip_gtk_tests', type: 'boolean', value: false,
     description: 'Skip tests that need a display connection')
 option('verbose_logs', type: 'boolean', value: false,
     description: 'Enable extra log messages that may decrease performance (not allowed in release builds)')
+option('installed_test_prefix', type: 'string', value: '',
+    description: 'Prefix for installed tests')