tvl-depot/tvix/cli/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

26 lines
757 B
Nix
Raw Normal View History

{ depot, pkgs, lib, ... }:
(depot.tvix.crates.workspaceMembers.tvix-cli.build.override {
runTests = true;
}).overrideAttrs (_: {
meta = {
ci.extraSteps.eval-nixpkgs-stdenv = {
label = ":nix: evaluate nixpkgs.stdenv in tvix";
needsOutput = true;
command = pkgs.writeShellScript "tvix-eval-stdenv" ''
TVIX_OUTPUT=$(result/bin/tvix -E '(import ${pkgs.path} {}).stdenv.drvPath')
EXPECTED='${/* the verbatim expected Tvix output: */ "=> \"${pkgs.stdenv.drvPath}\" :: string"}'
echo "Tvix output: ''${TVIX_OUTPUT}"
if [ "$TVIX_OUTPUT" != "$EXPECTED" ]; then
echo "Correct would have been ''${EXPECTED}"
exit 1
fi
echo "Output was correct."
'';
};
};
})