1{ stdenv, cabal-install, cabalProject', recurseIntoAttrs, runCommand, testSrc, compiler-nix-name }:
6 project = cabalProject' {
7 inherit compiler-nix-name;
8 src = testSrc "shell-for-setup-deps";
10 # Package has no exposed modules which causes
11 # haddock: No input file(s)
12 packages.bytestring-builder.doHaddock = false;
16 env = project.hsPkgs.shellFor {};
18# Making this work for cross compilers will be difficult as setup-deps are
19# built for the build platform and the shell will be for the host platform.
20# We probably need a shell that provides both build and host ghc
21# and corresponding package DBs and a way to use them.
22# This problem affects musl as well as the build libraries are linked to glibc.
23in recurseIntoAttrs (if stdenv.buildPlatform != stdenv.hostPlatform
25 let skip = runCommand "skipping-test-shell-for-setup-deps" {} ''
26 echo "Skipping shell-for-setup-deps test on cross compilers (does not work yet)" >& 2
30 ifdInputs = { plan-nix = skip; };
36 inherit (project) plan-nix;
39 run = stdenv.mkDerivation {
40 name = "shell-for-setup-deps-test";
43 ########################################################################
44 # test shell-for with an example program
46 cp ${./pkg/src}/*.hs .
48 printf "checking that the shell env has the dependencies...\n" >& 2
49 ${env.ghc}/bin/${env.ghc.targetPrefix}ghc-pkg list
50 ${env.ghc}/bin/${env.ghc.targetPrefix}runghc conduit-test.hs
55 meta.platforms = platforms.all;
56 meta.disabled = stdenv.buildPlatform != stdenv.hostPlatform;
59 # Used for debugging with nix repl
62 # Used for testing externally with nix-shell (../tests.sh).
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