2022-12-08 22:19:22 +01:00
|
|
|
{ depot, pkgs, lib, ... }:
|
|
|
|
|
2023-05-22 15:46:40 +02:00
|
|
|
let
|
|
|
|
mkNixpkgsEvalCheck = attrset: expectedPath: {
|
|
|
|
label = ":nix: evaluate nixpkgs.${attrset} in tvix";
|
|
|
|
needsOutput = true;
|
|
|
|
|
|
|
|
command = pkgs.writeShellScript "tvix-eval-${builtins.replaceStrings [".drv"] ["-drv"] attrset}" ''
|
|
|
|
TVIX_OUTPUT=$(result/bin/tvix -E '(import ${pkgs.path} {}).${attrset}')
|
|
|
|
EXPECTED='${/* the verbatim expected Tvix output: */ "=> \"${expectedPath}\" :: string"}'
|
|
|
|
|
|
|
|
echo "Tvix output: ''${TVIX_OUTPUT}"
|
|
|
|
if [ "$TVIX_OUTPUT" != "$EXPECTED" ]; then
|
|
|
|
echo "Correct would have been ''${EXPECTED}"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo "Output was correct."
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
in
|
|
|
|
|
2023-02-02 22:49:56 +01:00
|
|
|
(depot.tvix.crates.workspaceMembers.tvix-cli.build.override {
|
2022-12-08 22:19:22 +01:00
|
|
|
runTests = true;
|
2023-02-02 22:49:56 +01:00
|
|
|
}).overrideAttrs (_: {
|
|
|
|
meta = {
|
2023-05-22 15:46:40 +02:00
|
|
|
ci.extraSteps = {
|
|
|
|
eval-nixpkgs-stdenv-drvpath = (mkNixpkgsEvalCheck "stdenv.drvPath" pkgs.stdenv.drvPath);
|
|
|
|
eval-nixpkgs-stdenv-outpath = (mkNixpkgsEvalCheck "stdenv.outPath" pkgs.stdenv.outPath);
|
2023-05-24 11:07:49 +02:00
|
|
|
eval-nixpkgs-hello-outpath = (mkNixpkgsEvalCheck "hello.outPath" pkgs.hello.outPath);
|
2023-05-27 13:45:56 +02:00
|
|
|
|
|
|
|
# This is the furthest we get starting with stdenv we hit something similar to b/261
|
|
|
|
eval-nixpkgs-cross-gcc-outpath = (mkNixpkgsEvalCheck "pkgsCross.aarch64-multiplatform.buildPackages.gcc.outPath" pkgs.pkgsCross.aarch64-multiplatform.buildPackages.gcc.outPath);
|
2023-02-02 22:49:56 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
})
|