tectonic: --inherit-argv0 in the wrapper

The `nextonic` symlink was not working as intended because our tectonic
wrapper did not correctly pass along the executable name. This is fixed
by adding --inherit-argv0 to `makeWrapper`.

A test is also added to prevent breakage in the future.
This commit is contained in:
Bryan Lai 2024-03-12 21:08:16 +08:00
parent a343533bcc
commit 77c6cf9ec2
2 changed files with 8 additions and 1 deletions

View File

@ -90,4 +90,10 @@ lib.mapAttrs networkRequiringTestPkg {
tectonic -X new
cat Tectonic.toml | grep "${tectonic.bundleUrl}"
'';
/** test that the `nextonic -> tectonic` symlink is working as intended */
nextonic = ''
nextonic new 2>&1 \
| grep '"version 2" Tectonic command-line interface activated'
'';
}

View File

@ -46,7 +46,8 @@ symlinkJoin {
+ ''
makeWrapper ${lib.getBin tectonic-unwrapped}/bin/tectonic $out/bin/tectonic \
--prefix PATH : "${lib.getBin biber-for-tectonic}/bin" \
--add-flags "--web-bundle ${tectonic.passthru.bundleUrl}"
--add-flags "--web-bundle ${tectonic.passthru.bundleUrl}" \
--inherit-argv0 ## make sure binary name e.g. `nextonic` is passed along
ln -s $out/bin/tectonic $out/bin/nextonic
'';