Skip to content

Commit c7ec1a4

Browse files
committed
tests: Add ghcWithHoogle test
1 parent a72d2ec commit c7ec1a4

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

test/default.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ in {
1717
builder-haddock = haskell.callPackage ./builder-haddock {};
1818
stack-simple = haskell.callPackage ./stack-simple {};
1919
shell-for = haskell.callPackage ./shell-for {};
20+
snapshots = haskell.callPackage ./snapshots {};
2021
callStackToNix = haskell.callPackage ./callStackToNix {};
2122
callCabalProjectToNix = haskell.callPackage ./call-cabal-project-to-nix {};
2223

test/snapshots/default.nix

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{ stdenv, snapshots }:
2+
3+
with stdenv.lib;
4+
5+
let
6+
env = snapshots."lts-12.21".ghcWithHoogle
7+
(ps: with ps; [ conduit conduit-extra resourcet ]);
8+
9+
in
10+
stdenv.mkDerivation {
11+
name = "shell-for-test";
12+
13+
buildCommand = ''
14+
########################################################################
15+
# test snapshot ghcWithHoogle
16+
17+
printf "checking that the ghcWithPackages env has the package...\n" >& 2
18+
${env}/bin/ghc-pkg list | grep conduit
19+
20+
touch $out
21+
'';
22+
23+
meta.platforms = platforms.all;
24+
passthru = {
25+
inherit env;
26+
};
27+
}

0 commit comments

Comments
 (0)