File tree Expand file tree Collapse file tree 2 files changed +20
-14
lines changed Expand file tree Collapse file tree 2 files changed +20
-14
lines changed Original file line number Diff line number Diff line change 7575
7676 # Creates a development environment for Cabal builds or ghci
7777 # sessions, with various build tools included.
78- mkShell = name : hsPkgs : hsPkgs . shellFor {
78+ mkShell = name : hp : hp . shellFor {
7979 inherit name ;
8080 packages = ps : attrValues ( selectProjectPackages ps ) ;
8181 buildInputs = ( with self ; [
150150 tests = collectComponents "tests" isProjectPackage coveredHaskellPackages ;
151151 # `checks` are the result of executing the tests.
152152 checks = pkgs . recurseIntoAttrs ( getPackageChecks ( selectProjectPackages coveredHaskellPackages ) ) ;
153- # Combined coverage report
154- # fixme: haskell.nix needs to support using `checks` attrset from
155- # above, otherwise we will be running unnecessary test suites.
156- # testCoverageReport = pkgs.haskell-nix.haskellLib.projectCoverageReport {
157- # packages = selectProjectPackages coveredHaskellPackages;
158- # };
153+ # Combined project coverage report
154+ inherit ( coveredHaskellPackages ) testCoverageReport ;
159155 # `benchmarks` are only built, not run.
160156 benchmarks = collectComponents "benchmarks" isProjectPackage haskellPackages ;
161157
Original file line number Diff line number Diff line change 3131 filterSubDir = subDir :
3232 haskell . haskellLib . cleanSourceWith { inherit src subDir ; } ;
3333
34- pkgSet = haskell . mkStackPkgSet {
34+ pkg-set = haskell . mkStackPkgSet {
3535 inherit stack-pkgs ;
3636 modules = [
3737 # Add source filtering to local packages
@@ -302,10 +302,20 @@ let
302302 '' ;
303303 } ;
304304
305+ proj = haskell . addProjectAndPackageAttrs {
306+ inherit pkg-set ;
307+ inherit ( pkg-set . config ) hsPkgs ;
308+ } ;
309+
305310in
306- haskell . addProjectAndPackageAttrs {
307- pkg-set = pkgSet ;
308- inherit ( pkgSet . config ) hsPkgs ;
309- _config = pkgSet . config ;
310- _roots = haskell . roots pkgSet . config . ghc ;
311- }
311+ proj . hsPkgs // {
312+ _config = proj . pkg-set . config ;
313+ #_roots = haskell.roots proj.pkg-set.config.ghc;
314+ testCoverageReport = proj . projectCoverageReport . overrideAttrs ( old : {
315+ buildCommand = old . buildCommand + ''
316+ mkdir -p $out/nix-support
317+ echo "report coverage $out/share/hpc/vanilla/html/all/hpc_index.html" >> $out/nix-support/hydra-build-products
318+ echo "report coverage-per-package $out/share/hpc/vanilla/html/index.html" >> $out/nix-support/hydra-build-products
319+ '' ;
320+ } ) ;
321+ }
You can’t perform that action at this time.
0 commit comments