depot/pkgs/development/node-packages/package-tests/vega-lite.nix
Luke Granger-Brown 57725ef3ec Squashed 'third_party/nixpkgs/' content from commit 76612b17c0ce
git-subtree-dir: third_party/nixpkgs
git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
2024-11-10 23:59:47 +00:00

24 lines
738 B
Nix

{ runCommand, vega-lite }:
let
inherit (vega-lite) packageName version;
in
runCommand "${packageName}-tests" { meta.timeout = 60; }
''
# get version of installed program and compare with package version
claimed_version="$(${vega-lite}/bin/vl2vg --version)"
if [[ "$claimed_version" != "${version}" ]]; then
echo "Error: program version does not match package version ($claimed_version != ${version})"
exit 1
fi
# run dummy commands
${vega-lite}/bin/vl2vg --help > /dev/null
${vega-lite}/bin/vl2svg --help > /dev/null
${vega-lite}/bin/vl2png --help > /dev/null
${vega-lite}/bin/vl2pdf --help > /dev/null
# needed for Nix to register the command as successful
touch $out
''