nixd
nixd copied to clipboard
Use Meson subprojects
I see that there are per-library packages, and a top-level meson.build for development. Right now, this is assembled by hand but meson subprojects are what is exactly intended for this use-case. I recommend using them instead! You can look at the Nix repo to see how.
Right now, this is assembled by hand but meson subprojects are what is exactly intended for this use-case.
IIRC, it requires all subprojects placed in a hard-coded path subprojects/, that's unacceptable.
@inclyc the directory name is overrideable. We override it to src, for example. You might even be able to override it to ., but I am not sure.
I think the current layout works well though, what can we benefit from such migration?
@inclyc it makes the development environment more "realistic" / close to the "prod" separated Nix build. E.g. introduces a notion of scope in Meson's (otherwise) global variables, options also are namespaced per sub-project.
At the very least, I think it would allow to have a good deal less Meson code.
@inclyc the directory name is overrideable. We override it to
src, for example. You might even be able to override it to., but I am not sure.
It is not possible to override it to ..
../../meson.build:1:0: ERROR: Subproject_dir must not begin with a period.
I don't want to change the project layouts for now.