aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr
diff options
context:
space:
mode:
authoreldritch horrors <pennae@lix.systems>2024-03-29 02:37:14 +0100
committereldritch horrors <pennae@lix.systems>2024-03-29 02:45:48 +0000
commit6e5db5e4a226dc920a8959e8201d75f54c37dde2 (patch)
tree31670ff7dd821d154eabf0a833a3c28d6be1cb41 /src/libexpr
parent69bfd21e20cfd136af99f98dea26b5c0b5d934d3 (diff)
meson: install missing/generated headers
one headers (args/root.hh) was simply missing, and the generated headers were not installed. not all of them *should* be installed either, only a select few (and sadly this needs a custom target for each one, it seems) Change-Id: I37b25517895d0e5e521abc1202fa65624de57ed1
Diffstat (limited to 'src/libexpr')
-rw-r--r--src/libexpr/flake/meson.build8
-rw-r--r--src/libexpr/meson.build23
2 files changed, 23 insertions, 8 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,