feat(admin-config-tool): install standalone xceadmin binary via meson
xceadmin's custom_target only built+tested (stamp-file output, no
install:true) — nix build .#xcecore succeeded but shipped nothing in
result/bin, unlike every other component.
Add meson.add_install_script('meson-install.sh'): copies the
xceadmin/xcecommon package dirs (not the whole build-dir venv, whose
pip-generated shebang hardcodes a build path that stops existing after
the build) into $out/lib/xceadmin-site, then writes a wrapper at
$out/bin/xceadmin whose shebang and PYTHONPATH are resolved against
the install script's own nix build environment — real /nix/store
paths for python3 and each dependency (pycapnp, pyyaml, jsonschema,
click), so nix's reference scanner keeps them alive in the closure.
No venv activation needed at runtime.
Verified: meson install --destdir and nix build --option sandbox
false .#xcecore both produce a working result/bin/xceadmin, runnable
standalone with a stripped-down PATH-only environment.
This commit is contained in:
parent
e4fd9e1d3f
commit
893a01db7b
2 changed files with 47 additions and 0 deletions
|
|
@ -32,3 +32,9 @@ xceadmin_stamp = custom_target('xceadmin',
|
|||
build_always_stale: true,
|
||||
console: true,
|
||||
)
|
||||
|
||||
# Installs a standalone $out/bin/xceadmin -- runs after xceadmin_stamp
|
||||
# (ninja install always depends on build_by_default targets first) so the
|
||||
# build-dir venv it copies from already exists. See meson-install.sh for
|
||||
# why this isn't a plain `cp` of that venv.
|
||||
meson.add_install_script('meson-install.sh')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue