Skip to content

Instantly share code, notes, and snippets.

@k0001
Last active January 18, 2018 12:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save k0001/93b83dc652de42d6b4da79393267d287 to your computer and use it in GitHub Desktop.
Save k0001/93b83dc652de42d6b4da79393267d287 to your computer and use it in GitHub Desktop.
I've done something like this in the past: I installed the test executables
somewhere in $out (although presumably one could use an output different
than $out). You will need to change `testTarget` and/or `checkPhase` as well,
so as to prevent the tests from being run with Nix. Then, once the thing is
installed, you just execute /nix/store/whatever/libexec/tests/foo-tests.
postInstall = ''
if [ "$doCheck" = "1" ]; then
mkdir -p $out/libexec/tests
cp ./dist/build/foo-tests $out/libexec/tests/foo-tests
fi
'';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment