diff --git a/src/libexpr-c/meson.build b/src/libexpr-c/meson.build index 3c5d9e6b7..fa970c3a2 100644 --- a/src/libexpr-c/meson.build +++ b/src/libexpr-c/meson.build @@ -69,6 +69,9 @@ headers = [config_h] + files( 'nix_api_value.h', ) +# TODO don't install this once tests don't use it. +headers += files('nix_api_expr_internal.h') + subdir('build-utils-meson/export-all-symbols') this_library = library( diff --git a/src/libstore-c/meson.build b/src/libstore-c/meson.build index 4f2d77d9f..93ce97960 100644 --- a/src/libstore-c/meson.build +++ b/src/libstore-c/meson.build @@ -61,6 +61,9 @@ headers = [config_h] + files( 'nix_api_store.h', ) +# TODO don't install this once tests don't use it. +headers += files('nix_api_store_internal.h') + subdir('build-utils-meson/export-all-symbols') this_library = library( diff --git a/src/libstore-test/meson.build b/src/libstore-test/meson.build index bfd827b01..6bf0a5028 100644 --- a/src/libstore-test/meson.build +++ b/src/libstore-test/meson.build @@ -27,6 +27,9 @@ subdir('build-utils-meson/subprojects') subdir('build-utils-meson/export-all-symbols') +sqlite = dependency('sqlite3', 'sqlite', version : '>=3.6.19') +deps_private += sqlite + rapidcheck = dependency('rapidcheck') deps_private += rapidcheck diff --git a/src/libstore-test/package.nix b/src/libstore-test/package.nix index 0a49f1a05..e37e64886 100644 --- a/src/libstore-test/package.nix +++ b/src/libstore-test/package.nix @@ -9,6 +9,7 @@ , nix-store , nix-store-c , nix-store-test-support +, sqlite , rapidcheck , gtest @@ -64,6 +65,7 @@ mkDerivation (finalAttrs: { nix-store nix-store-c nix-store-test-support + sqlite rapidcheck gtest ]; @@ -94,10 +96,15 @@ mkDerivation (finalAttrs: { passthru = { tests = { - run = runCommand "${finalAttrs.pname}-run" { - } '' + run = let + # Inline some drv files shared with the libexpr tests + data = runCommand "${finalAttrs.pname}-test-data" {} '' + cp -r --no-preserve=mode ${./data} $out + cp -r --remove-destination ${../../tests/functional/derivation}/* $out/derivation/ + ''; + in runCommand "${finalAttrs.pname}-run" {} '' PATH="${lib.makeBinPath [ finalAttrs.finalPackage ]}:$PATH" - export _NIX_TEST_UNIT_DATA=${./data} + export _NIX_TEST_UNIT_DATA=${data} nix-store-test touch $out ''; diff --git a/src/libutil-c/meson.build b/src/libutil-c/meson.build index 5e12186d2..2fa1bd424 100644 --- a/src/libutil-c/meson.build +++ b/src/libutil-c/meson.build @@ -57,6 +57,9 @@ headers = [config_h] + files( 'nix_api_util.h', ) +# TODO don't install this once tests don't use it. +headers += files('nix_api_util_internal.h') + subdir('build-utils-meson/export-all-symbols') this_library = library(