@@ -60,9 +60,9 @@ let
60 srcDirs = map (l: l.src.outPath) (projectLibs);
60 srcDirs = map (l: l.src.outPath) (projectLibs);
62in pkgs.runCommand "project-coverage-report"
62in pkgs.runCommand "project-coverage-report"
63− ({ buildInputs = [ghc];
63+ ({ nativeBuildInputs = [ (ghc.buildGHC or ghc) pkgs.buildPackages.zip ];
64− LANG = "en_US.UTF-8";
64+ LANG = "en_US.UTF-8";
65− LC_ALL = "en_US.UTF-8";
65+ LC_ALL = "en_US.UTF-8";
66 } // lib.optionalAttrs (stdenv.buildPlatform.libc == "glibc") {
66 } // lib.optionalAttrs (stdenv.buildPlatform.libc == "glibc") {
67 LOCALE_ARCHIVE = "${pkgs.buildPackages.glibcLocales}/lib/locale/locale-archive";
67 LOCALE_ARCHIVE = "${pkgs.buildPackages.glibcLocales}/lib/locale/locale-archive";
@@ -106,6 +106,7 @@ in pkgs.runCommand "project-coverage-report"
109+ mkdir -p $out/nix-support
109 mkdir -p $out/share/hpc/vanilla/tix/all
110 mkdir -p $out/share/hpc/vanilla/tix/all
110 mkdir -p $out/share/hpc/vanilla/mix/
111 mkdir -p $out/share/hpc/vanilla/mix/
111 mkdir -p $out/share/hpc/vanilla/html/
112 mkdir -p $out/share/hpc/vanilla/html/
@@ -136,6 +137,7 @@ in pkgs.runCommand "project-coverage-report"
137 # Markup a HTML coverage report for the entire project
138 # Markup a HTML coverage report for the entire project
138 cp ${projectIndexHtml} $out/share/hpc/vanilla/html/index.html
139 cp ${projectIndexHtml} $out/share/hpc/vanilla/html/index.html
140+ echo "report coverage-per-package $out/share/hpc/vanilla/html/index.html" >> $out/nix-support/hydra-build-products
140 local markupOutDir="$out/share/hpc/vanilla/html/all"
142 local markupOutDir="$out/share/hpc/vanilla/html/all"
141 local srcDirs=${toBashArray srcDirs}
143 local srcDirs=${toBashArray srcDirs}
@@ -146,5 +148,9 @@ in pkgs.runCommand "project-coverage-report"
146 findModules allMixModules "$out/share/hpc/vanilla/mix/" "*.mix"
148 findModules allMixModules "$out/share/hpc/vanilla/mix/" "*.mix"
148 markup srcDirs mixDirs allMixModules "$markupOutDir" "$tixFile"
150 markup srcDirs mixDirs allMixModules "$markupOutDir" "$tixFile"
152+ echo "report coverage $markupOutDir/hpc_index.html" >> $out/nix-support/hydra-build-products
153+ ( cd $out/share/hpc/vanilla/html ; zip -r $out/share/hpc/vanilla/html.zip . )
154+ echo "file zip $out/share/hpc/vanilla/html.zip" >> $out/nix-support/hydra-build-products