Skip to content

Commit 82ee913

Browse files
committed
tests: Add ghcWithHoogle test
1 parent 77ea18a commit 82ee913

File tree

2 files changed

+18
-4
lines changed

2 files changed

+18
-4
lines changed

test/default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ in {
1616
with-packages = haskell.callPackage ./with-packages { inherit util; };
1717
builder-haddock = haskell.callPackage ./builder-haddock {};
1818
stack-simple = haskell.callPackage ./stack-simple {};
19-
snapshots = haskell.callPackage ./snapshots {};
2019
shell-for = haskell.callPackage ./shell-for {};
20+
snapshots = haskell.callPackage ./snapshots {};
2121
callStackToNix = haskell.callPackage ./callStackToNix {};
2222
callCabalProjectToNix = haskell.callPackage ./call-cabal-project-to-nix {};
2323

test/snapshots/default.nix

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,33 @@
1-
{ stdenv, haskellPackages }:
1+
{ stdenv, haskellPackages, snapshots }:
22

33
with stdenv.lib;
44

5+
let
6+
env = snapshots."lts-12.21".ghcWithHoogle
7+
(ps: with ps; [ conduit conduit-extra resourcet ]);
8+
9+
in
510
stdenv.mkDerivation {
611
name = "shell-for-test";
712

813
buildCommand = ''
914
########################################################################
10-
# test snapshot ghcWithHoogle
15+
# test single component from haskellPackages
1116
1217
printf "checking that the latest LTS snapshot has the lens package...\n" >& 2
1318
test -d ${haskellPackages.lens.components.library}
1419
20+
########################################################################
21+
# test snapshot ghcWithHoogle
22+
23+
printf "checking that the ghcWithPackages env has the package...\n" >& 2
24+
${env}/bin/ghc-pkg list | grep conduit
25+
1526
touch $out
1627
'';
1728

1829
meta.platforms = platforms.all;
19-
}
30+
passthru = {
31+
inherit env;
32+
};
33+
}

0 commit comments

Comments
 (0)