tectonic: add passthru.tests.workspace

Also, replace `builtins.toFile` with `pkgs.writeText` because the former
blocks the evaluation loop just like an import from derivation (IFD).
Although it is _technically_ not an IFD, it has very similar effects,
and thus we should prefer the nixpkgs `pkgs.writeText` instead.
This commit is contained in:
Bryan Lai 2024-01-01 16:27:55 +08:00
parent 771e06e9ee
commit 98a319b7c7

View File

@ -3,6 +3,7 @@
{ lib
, fetchFromGitHub
, writeText
, runCommand
, tectonic
, curl
@ -26,7 +27,7 @@ let
};
testfiles = "${biber-dev-source}/testfiles";
noNetNotice = builtins.toFile "tectonic-offline-notice" ''
noNetNotice = writeText "tectonic-offline-notice" ''
# To fetch tectonic's web bundle, the tests require internet access,
# which is not available in the current environment.
'';
@ -84,4 +85,9 @@ lib.mapAttrs networkRequiringTestPkg {
export HOME=$PWD
tectonic -X compile ./test.tex
'';
workspace = ''
tectonic -X new
cat Tectonic.toml | grep "${tectonic.bundleUrl}"
'';
}