1{ stdenv, util, mkPkgSet, recurseIntoAttrs, testSrc }:
7 pkgs = import ./pkgs.nix;
8 pkgSet = doExactConfig: mkPkgSet {
13 pkg-def-extras = [ pkgs.extras ];
15 # overrides to fix the build
17 packages.transformers-compat.components.library.doExactConfig = true;
20 # vary component config for tests
22 packages.test-with-packages.components.library.doExactConfig = doExactConfig;
27 packages = doExactConfig: (pkgSet doExactConfig).config.hsPkgs;
29 package = doExactConfig: (packages doExactConfig).test-with-packages;
31 decLibrary = (package true).components.library;
32 library = (package false).components.library;
34 pkgId = p: "${p.identifier.name}-${p.identifier.version}";
35 showDepends = component: concatMapStringsSep " " pkgId (component.depends or []);
38 # Used for testing externally with nix-shell (../tests.sh).
39 # This just adds cabal-install to the existing shells.
40 test-shell = addCabalInstall library;
42 # A variant of test-shell with the component option doExactConfig enabled
43 test-shell-dec = addCabalInstall decLibrary;
45 run = stdenv.mkDerivation {
46 name = "with-packages-test";
47 decLibraryDepends = showDepends (pkgSet true).config.packages.test-with-packages.components.library;
48 libraryDepends = showDepends (pkgSet false).config.packages.test-with-packages.components.library;
51 ########################################################################
54 printf "checking component depends ... " >& 2
55 if [ -n "$decLibraryDepends" -a "$decLibraryDepends" = "$libraryDepends" ]; then
59 echo "decLibraryDepends = $decLibraryDepends"
60 echo "libraryDepends = $libraryDepends"
64 printf "checking that the 'library' without doExactConfig works... " >& 2
67 printf "checking that the 'library' with doExactConfig works... " >& 2
68 echo ${decLibrary} >& 2
69 '' + (if stdenv.hostPlatform.isWindows
71 printf "runghc tests are not working yet for windows. skipping. " >& 2
74 printf "checking that non doExactConfig liarary.env has the dependencies... " >& 2
75 ${library.env}/bin/${library.env.targetPrefix}runghc ${./Point.hs}
78 printf "checking that doExactConfig library.env has the dependencies... " >& 2
79 ${decLibrary.env}/bin/${decLibrary.env.targetPrefix}runghc ${./Point.hs}
85 meta.platforms = platforms.all;
86 meta.disabled = stdenv.hostPlatform.isMusl;
89 # Used for debugging with nix repl
90 inherit packages pkgSet;
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