Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ runCommand, vega-lite }:
2
3let
4 inherit (vega-lite) packageName version;
5in
6
7runCommand "${packageName}-tests" { meta.timeout = 60; }
8 ''
9 # get version of installed program and compare with package version
10 claimed_version="$(${vega-lite}/bin/vl2vg --version)"
11 if [[ "$claimed_version" != "${version}" ]]; then
12 echo "Error: program version does not match package version ($claimed_version != ${version})"
13 exit 1
14 fi
15
16 # run dummy commands
17 ${vega-lite}/bin/vl2vg --help > /dev/null
18 ${vega-lite}/bin/vl2svg --help > /dev/null
19 ${vega-lite}/bin/vl2png --help > /dev/null
20 ${vega-lite}/bin/vl2pdf --help > /dev/null
21
22 # needed for Nix to register the command as successful
23 touch $out
24 ''