1{ stdenv, mkCabalProjectPkgSet, cabalProject', haskellLib, util, recurseIntoAttrs, testSrc, compiler-nix-name }:
6 project = cabalProject' {
7 inherit compiler-nix-name;
8 src = testSrc "cabal-22";
11 packages = project.hsPkgs;
15 inherit (project) plan-nix;
17 shell = util.addCabalInstall packages.project.components.library;
18 run = stdenv.mkDerivation {
19 name = "cabal-22-test";
22 exe="${packages.project.components.exes.project}/bin/project${stdenv.hostPlatform.extensions.executable}"
24 size=$(command stat --format '%s' "$exe")
25 printf "size of executable $exe is $size. \n" >& 2
27 # fixme: run on target platform when cross-compiled
28 printf "checking whether executable runs... " >& 2
29 cat ${haskellLib.check packages.project.components.exes.project}/test-stdout
32 # Aarch is statically linked and does not produce a .so file.
33 # Musl is also statically linked, but it does make a .so file so we should check that still.
34 optionalString (!stdenv.hostPlatform.isAarch32 && !stdenv.hostPlatform.isAarch64) (''
35 printf "checking that executable is dynamically linked to system libraries... " >& 2
36 '' + optionalString (stdenv.isLinux && !stdenv.hostPlatform.isMusl) ''
37 ldd $exe | grep libgmp
38 '' + optionalString stdenv.isDarwin ''
39 otool -L $exe | grep "libSystem.B"
41 # fixme: posix-specific
42 printf "checking that dynamic library is produced... " >& 2
43 '' + optionalString stdenv.isLinux ''
44 sofile=$(find "${packages.project.components.library}" | grep -e '\.so$')
45 '' + optionalString stdenv.isDarwin ''
46 sofile=$(find "${packages.project.components.library}" | grep -e '\.dylib$')
49 '' + optionalString (!stdenv.hostPlatform.isMusl) (''
50 printf "checking that dynamic library is dynamically linked to prim... " >& 2
51 '' + optionalString stdenv.isLinux ''
52 ldd $sofile | grep libHSghc-prim
53 '' + optionalString stdenv.isDarwin ''
54 otool -L $sofile | grep libHSghc-prim
58 printf "checking whether benchmark ran... " >& 2
59 cat ${haskellLib.check packages.project.components.benchmarks.project-bench}/test-stdout
61 printf "checking whether tests ran... " >& 2
62 cat ${haskellLib.check packages.project.components.tests.unit}/test-stdout
65 meta.platforms = platforms.all;
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