aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libexpr/flake/meson.build8
-rw-r--r--src/libexpr/meson.build23
-rw-r--r--src/libstore/meson.build16
-rw-r--r--src/libutil/meson.build1
4 files changed, 36 insertions, 12 deletions
diff --git a/src/libexpr/flake/meson.build b/src/libexpr/flake/meson.build
new file mode 100644
index 000000000..3ecc30f4e
--- /dev/null
+++ b/src/libexpr/flake/meson.build
@@ -0,0 +1,8 @@
+libexpr_generated_headers += custom_target(
+ command : [ 'bash', '-c', 'echo \'R"__NIX_STR(\' | cat - @INPUT@ && echo \')__NIX_STR"\'' ],
+ input : 'call-flake.nix',
+ output : '@PLAINNAME@.gen.hh',
+ capture : true,
+ install : true,
+ install_dir : includedir / 'nix/flake',
+)
diff --git a/src/libexpr/meson.build b/src/libexpr/meson.build
index e0449ab4e..7c0555f8f 100644
--- a/src/libexpr/meson.build
+++ b/src/libexpr/meson.build
@@ -49,10 +49,20 @@ meson.add_install_script(
'@0@'.format(includedir),
)
-imported_drv_to_derivation_gen = gen_header.process('imported-drv-to-derivation.nix')
-fetchurl_gen = gen_header.process('fetchurl.nix')
-derivation_gen = gen_header.process('primops/derivation.nix', preserve_path_from : meson.current_source_dir())
-call_flake_gen = gen_header.process('flake/call-flake.nix')
+libexpr_generated_headers = [
+ gen_header.process('primops/derivation.nix', preserve_path_from : meson.current_source_dir()),
+]
+foreach header : [ 'imported-drv-to-derivation.nix', 'fetchurl.nix' ]
+ libexpr_generated_headers += custom_target(
+ command : [ 'bash', '-c', 'echo \'R"__NIX_STR(\' | cat - @INPUT@ && echo \')__NIX_STR"\'' ],
+ input : header,
+ output : '@PLAINNAME@.gen.hh',
+ capture : true,
+ install : true,
+ install_dir : includedir / 'nix',
+ )
+endforeach
+subdir('flake')
libexpr_sources = files(
'attr-path.cc',
@@ -121,10 +131,7 @@ libexpr = library(
libexpr_sources,
parser_tab,
lexer_tab,
- imported_drv_to_derivation_gen,
- fetchurl_gen,
- derivation_gen,
- call_flake_gen,
+ libexpr_generated_headers,
dependencies : [
liblixutil,
liblixstore,
diff --git a/src/libstore/meson.build b/src/libstore/meson.build
index c4b12f61e..29dbc5e70 100644
--- a/src/libstore/meson.build
+++ b/src/libstore/meson.build
@@ -1,5 +1,14 @@
-schema_sql_gen = gen_header.process('schema.sql')
-ca_specific_schema_gen = gen_header.process('ca-specific-schema.sql')
+libstore_generated_headers = []
+foreach header : [ 'schema.sql', 'ca-specific-schema.sql' ]
+ libstore_generated_headers += custom_target(
+ command : [ 'bash', '-c', 'echo \'R"__NIX_STR(\' | cat - @INPUT@ && echo \')__NIX_STR"\'' ],
+ input : header,
+ output : '@PLAINNAME@.gen.hh',
+ capture : true,
+ install : true,
+ install_dir : includedir / 'nix',
+ )
+endforeach
libstore_sources = files(
'binary-cache-store.cc',
@@ -157,8 +166,7 @@ endforeach
libstore = library(
'nixstore',
- schema_sql_gen,
- ca_specific_schema_gen,
+ libstore_generated_headers,
libstore_sources,
dependencies : [
libarchive,
diff --git a/src/libutil/meson.build b/src/libutil/meson.build
index 8e4b5211d..c0dd1aa2b 100644
--- a/src/libutil/meson.build
+++ b/src/libutil/meson.build
@@ -35,6 +35,7 @@ libutil_headers = files(
'abstract-setting-to-json.hh',
'ansicolor.hh',
'archive.hh',
+ 'args/root.hh',
'args.hh',
'box_ptr.hh',
'callback.hh',