1{ stdenv, cabal-install, mkCabalProjectPkgSet, recurseIntoAttrs, runCommand, testSrc }:
6 pkgSet = mkCabalProjectPkgSet {
7 plan-pkgs = import ./pkgs.nix;
9 pkga = ./.plan.nix/pkga.nix;
10 pkgb = ./.plan.nix/pkgb.nix;
13 # Package has no exposed modules which causes
14 # haddock: No input file(s)
15 packages.bytestring-builder.doHaddock = false;
19 env = pkgSet.config.hsPkgs.shellFor {
20 # Shell will provide the dependencies of pkga and pkgb, but not
21 # pkga and pkgb themselves.
22 packages = ps: with ps; [ pkga pkgb ];
23 # This adds cabal-install to the shell, which helps tests because
24 # they use a nix-shell --pure. Normally you would BYO cabal-install.
25 tools = { cabal = "3.2.0.0"; };
29 envPkga = pkgSet.config.hsPkgs.shellFor {
30 # Shell will provide the dependencies of pkga
31 packages = ps: with ps; [ pkga ];
32 # This adds cabal-install to the shell, which helps tests because
33 # they use a nix-shell --pure. Normally you would BYO cabal-install.
34 tools = { cabal = "3.2.0.0"; };
38 envDefault = pkgSet.config.hsPkgs.shellFor {
39 # The default implementation of packages should use isLocal and the
40 # result should be the same as:
41 # packages = ps: with ps; [ pkga pkgb ];
42 # This adds cabal-install to the shell, which helps tests because
43 # they use a nix-shell --pure. Normally you would BYO cabal-install.
44 tools = { cabal = "3.2.0.0"; };
47in recurseIntoAttrs (if stdenv.hostPlatform.isWindows
49 let skip = runCommand "skip-test-shell-for" {} ''
50 echo "Skipping shell-for test on windows as does not work yet" >& 2
60 inherit env envPkga envDefault;
61 run = stdenv.mkDerivation {
62 name = "shell-for-test";
65 ########################################################################
66 # test shell-for with an example program
68 cp ${./pkgb/src}/*.hs .
70 printf "checking that the shell env has the dependencies...\n" >& 2
71 ${env.ghc}/bin/${env.ghc.targetPrefix}runghc conduit-test.hs
73 printf "checking that the shell envDefault has the dependencies...\n" >& 2
74 ${envDefault.ghc}/bin/${env.ghc.targetPrefix}runghc conduit-test.hs
79 meta.platforms = platforms.all;
80 meta.disabled = stdenv.hostPlatform.isMusl || stdenv.hostPlatform.isWindows;
83 # Used for debugging with nix repl
86 # Used for testing externally with nix-shell (../tests.sh).
87 inherit env envPkga envDefault;
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list