60
60
srcDirs = map ( l : l . src . outPath ) ( projectLibs ) ;
61
61
62
62
in pkgs . runCommand "project-coverage-report"
63
- ( { buildInputs = [ ghc ] ;
64
- LANG = "en_US.UTF-8" ;
65
- LC_ALL = "en_US.UTF-8" ;
63
+ ( { nativeBuildInputs = [ ( ghc . buildGHC or ghc ) pkgs . buildPackages . zip ] ;
64
+ LANG = "en_US.UTF-8" ;
65
+ LC_ALL = "en_US.UTF-8" ;
66
66
} // lib . optionalAttrs ( stdenv . buildPlatform . libc == "glibc" ) {
67
67
LOCALE_ARCHIVE = "${ pkgs . buildPackages . glibcLocales } /lib/locale/locale-archive" ;
68
68
} )
@@ -106,6 +106,7 @@ in pkgs.runCommand "project-coverage-report"
106
106
popd
107
107
}
108
108
109
+ mkdir -p $out/nix-support
109
110
mkdir -p $out/share/hpc/vanilla/tix/all
110
111
mkdir -p $out/share/hpc/vanilla/mix/
111
112
mkdir -p $out/share/hpc/vanilla/html/
@@ -136,6 +137,7 @@ in pkgs.runCommand "project-coverage-report"
136
137
137
138
# Markup a HTML coverage report for the entire project
138
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
139
141
140
142
local markupOutDir="$out/share/hpc/vanilla/html/all"
141
143
local srcDirs=${ toBashArray srcDirs }
@@ -146,5 +148,9 @@ in pkgs.runCommand "project-coverage-report"
146
148
findModules allMixModules "$out/share/hpc/vanilla/mix/" "*.mix"
147
149
148
150
markup srcDirs mixDirs allMixModules "$markupOutDir" "$tixFile"
151
+
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
149
155
fi
150
156
''
0 commit comments