1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-29 06:21:14 +02:00

Unexpose config headers (low hanging fruit only)

- Some headers were completely redundant and have been removed.
- Other headers have been turned private.
- Unnecessary meson.build code has been removed.
- libutil-tests now has a private config header, where previously
  it had none. This removes the need to expose a package version
  macro publicly.

(cherry picked from commit b86a76044e)
This commit is contained in:
Robert Hensing 2025-03-28 14:14:45 +00:00 committed by Mergify
parent a8749a412f
commit 569631b1d5
15 changed files with 25 additions and 82 deletions

View file

@ -23,7 +23,6 @@ deps_public_maybe_subproject = [
]
subdir('nix-meson-build-support/subprojects')
# TODO rename, because it will conflict with downstream projects
configdata.set_quoted('PACKAGE_VERSION', meson.project_version())
config_h = configure_file(
@ -38,8 +37,6 @@ add_project_arguments(
# From C++ libraries, only for internals
'-include', 'config-util.hh',
# From C libraries, for our public, installed headers too
'-include', 'config-util.h',
language : 'cpp',
)
@ -51,7 +48,7 @@ sources = files(
include_dirs = [include_directories('.')]
headers = [config_h] + files(
headers = files(
'nix_api_util.h',
)
@ -64,6 +61,7 @@ subdir('nix-meson-build-support/windows-version')
this_library = library(
'nixutilc',
sources,
config_h,
dependencies : deps_public + deps_private + deps_other,
include_directories : include_dirs,
link_args: linker_export_flags,

View file

@ -7,6 +7,8 @@
#include <cxxabi.h>
#include <typeinfo>
#include "config-util.h"
nix_c_context * nix_c_context_create()
{
return new nix_c_context();