diff --git a/src/libexpr/expr-config.hh b/src/libexpr/expr-config.hh new file mode 100644 index 000000000..e28b461c0 --- /dev/null +++ b/src/libexpr/expr-config.hh @@ -0,0 +1,3 @@ +// TODO: Remove this damn file while keeping public config headers working +#error \ + "This file is a placeholder. It only exists so that meson accepts the symbolic link include/nix/expr/config.hh to this file, but we expect meson to overwrite it with the real file. Apparently that did not happen. I deeply apologize for this mess." diff --git a/src/libexpr/include/nix/expr/config.hh b/src/libexpr/include/nix/expr/config.hh new file mode 120000 index 000000000..45d3ca29d --- /dev/null +++ b/src/libexpr/include/nix/expr/config.hh @@ -0,0 +1 @@ +../../../expr-config.hh \ No newline at end of file diff --git a/src/libexpr/include/nix/expr/meson.build b/src/libexpr/include/nix/expr/meson.build index 01275e52e..3eb80de68 100644 --- a/src/libexpr/include/nix/expr/meson.build +++ b/src/libexpr/include/nix/expr/meson.build @@ -10,6 +10,7 @@ config_pub_h = configure_file( headers = [config_pub_h] + files( 'attr-path.hh', 'attr-set.hh', + 'config.hh', 'eval-cache.hh', 'eval-error.hh', 'eval-gc.hh', diff --git a/src/libexpr/meson.build b/src/libexpr/meson.build index 2e773938d..402bca0e1 100644 --- a/src/libexpr/meson.build +++ b/src/libexpr/meson.build @@ -79,6 +79,11 @@ config_priv_h = configure_file( output : 'expr-config-private.hh', ) +config_pub_h = configure_file( + configuration : configdata_pub, + output : 'expr-config.hh', +) + subdir('nix-meson-build-support/common') parser_tab = custom_target( @@ -163,6 +168,8 @@ subdir('primops') subdir('nix-meson-build-support/export-all-symbols') subdir('nix-meson-build-support/windows-version') +headers += [config_pub_h] + this_library = library( 'nixexpr', sources, @@ -181,4 +188,8 @@ install_headers(headers, subdir : 'nix/expr', preserve_path : true) libraries_private = [] +nixexpr_dep = declare_dependency( + include_directories : include_directories('.'), + link_with : this_library, +) subdir('nix-meson-build-support/export') diff --git a/src/libmain/meson.build b/src/libmain/meson.build index 414fc679f..4f78d265b 100644 --- a/src/libmain/meson.build +++ b/src/libmain/meson.build @@ -17,6 +17,8 @@ subdir('nix-meson-build-support/deps-lists') configdata = configuration_data() deps_private_maybe_subproject = [ + # This dependency may be very limited; was introduced for NIX_USE_BOEHMGC macro dependency + dependency('nix-expr'), ] deps_public_maybe_subproject = [ dependency('nix-util'), diff --git a/src/libmain/package.nix b/src/libmain/package.nix index 949603464..7b0a4dee7 100644 --- a/src/libmain/package.nix +++ b/src/libmain/package.nix @@ -6,6 +6,7 @@ nix-util, nix-store, + nix-expr, # Configuration Options @@ -33,6 +34,10 @@ mkMesonLibrary (finalAttrs: { ]; propagatedBuildInputs = [ + # FIXME: This is only here for the NIX_USE_BOEHMGC macro dependency + # Removing nix-expr will make the build more concurrent and is + # architecturally nice, perhaps. + nix-expr nix-util nix-store openssl diff --git a/src/libstore-tests/meson.build b/src/libstore-tests/meson.build index 1822a3520..eb3d14530 100644 --- a/src/libstore-tests/meson.build +++ b/src/libstore-tests/meson.build @@ -40,6 +40,9 @@ deps_private += gtest configdata = configuration_data() configdata.set_quoted('PACKAGE_VERSION', meson.project_version()) +aws_s3 = dependency('aws-cpp-sdk-s3', required : false) +configdata.set('ENABLE_S3', aws_s3.found().to_int()) + config_priv_h = configure_file( configuration : configdata, output : 'store-tests-config.hh', diff --git a/src/libstore/meson.build b/src/libstore/meson.build index 2f16bf66f..e9f817482 100644 --- a/src/libstore/meson.build +++ b/src/libstore/meson.build @@ -158,6 +158,7 @@ if get_option('embedded-sandbox-shell') # The path to busybox is passed as a -D flag when compiling this_library. # This solution is inherited from the old make buildsystem # TODO: do this differently? + # TODO: at least define it unconditionally, so we get checking from -Wundef configdata_priv.set('HAVE_EMBEDDED_SANDBOX_SHELL', 1) hexdump = find_program('hexdump', native : true) embedded_sandbox_shell_gen = custom_target( @@ -181,6 +182,11 @@ config_priv_h = configure_file( output : 'store-config-private.hh', ) +config_pub_h = configure_file( + configuration : configdata_pub, + output : 'store-config.hh', +) + subdir('nix-meson-build-support/common') sources = files( @@ -363,7 +369,7 @@ this_library = library( install : true, ) -install_headers(headers, subdir : 'nix/store', preserve_path : true) +install_headers(headers + [ config_pub_h ], subdir : 'nix/store', preserve_path : true) libraries_private = []