nixpkgs/pkgs/by-name/ge/geocode-glib/installed-tests-path.patch
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

27 lines
1.1 KiB
Diff

diff --git a/geocode-glib/tests/meson.build b/geocode-glib/tests/meson.build
index 5cd1fca..c2f9a9d 100644
--- a/geocode-glib/tests/meson.build
+++ b/geocode-glib/tests/meson.build
@@ -1,5 +1,5 @@
-install_dir = get_option('prefix') / get_option('datadir') / 'installed-tests' / library_name
-install_bindir = get_option('prefix') / get_option('libexecdir') / library_name
+install_dir = get_option('installed_test_prefix') / 'share' / 'installed-tests' / library_name
+install_bindir = get_option('installed_test_prefix') / 'libexec' / library_name
e = executable('geo-uri',
'geo-uri.c',
diff --git a/meson_options.txt b/meson_options.txt
index 62b713d..1454416 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -1,6 +1,9 @@
option('enable-installed-tests',
type: 'boolean', value: true,
description: 'Build & install test programs')
+option('installed_test_prefix',
+ type: 'string', value: '',
+ description: 'Prefix for installed tests')
option('enable-introspection',
type: 'boolean', value: true,
description: 'Whether to enable the introspection generation')