@@ -179,9 +179,19 @@ in stdenv.mkDerivation ({
179 runHook postBuild
179 runHook postBuild
182+ # Note: Cabal does *not* copy test executables during the `install` phase.
183+ # Thus we'll just copy them during the check phase.
182 checkPhase = ''
184 checkPhase = ''
183 runHook preCheck
185 runHook preCheck
184 $SETUP_HS test
186 $SETUP_HS test
187+ mkdir -p $out/${name}
188+ cp dist/test/*.log $out/${name}/
189+ if [ -f "dist/build/${componentId.cname}/${componentId.cname}" ]; then
190+ cp dist/build/${componentId.cname}/${componentId.cname} $out/${name}/
192+ if [ -f "dist/build/${componentId.cname}/${componentId.cname}.exe" ]; then
193+ cp dist/build/${componentId.cname}/${componentId.cname} $out/${name}/
185 runHook postCheck
195 runHook postCheck