{ stdenv, garbage, pkgs }: stdenv.mkDerivation { name = "garbage-tests"; src = ./.; installPhase = "mkdir -p $out"; doCheck = true; buildInputs = with pkgs; [ garbage proot mktemp mount which bash ]; checkPhase = '' function runTest() { printf "Running %s ----------\n" $1 bash $1 echo "---------------------" } export -f runTest find . -executable -name "*.sh" | sort | xargs bash -c 'runTest "$@"' ''; }