2{ stdenv, util, mkCabalProjectPkgSet, project', haskellLib, recurseIntoAttrs, testSrc, compiler-nix-name }:
9 # Package has no exposed modules which causes
10 # haddock: No input file(s)
11 packages.cabal-simple.doHaddock = false;
16 inherit compiler-nix-name;
17 src = testSrc "cabal-simple";
21 packages = project.hsPkgs;
25 inherit (project) plan-nix;
28 # Used for testing externally with nix-shell (../tests.sh).
29 test-shell = packages.shellFor { tools = { cabal = "3.2.0.0"; }; };
31 run = stdenv.mkDerivation {
32 name = "cabal-simple-test";
35 exe="${packages.cabal-simple.components.exes.cabal-simple}/bin/cabal-simple${stdenv.hostPlatform.extensions.executable}"
37 size=$(command stat --format '%s' "$exe")
38 printf "size of executable $exe is $size. \n" >& 2
40 # fixme: run on target platform when cross-compiled
41 printf "checking whether executable runs... " >& 2
42 cat ${haskellLib.check packages.cabal-simple.components.exes.cabal-simple}/test-stdout
43 '' + (if stdenv.hostPlatform.isMusl
45 printf "checking that executable is statically linked... " >& 2
46 (ldd $exe 2>&1 || true) | grep -i "not a"
49 # Skip this on aarch as we do not have an `ldd` tool
50 optionalString (!stdenv.hostPlatform.isAarch32 && !stdenv.hostPlatform.isAarch64) (''
51 printf "checking that executable is dynamically linked to system libraries... " >& 2
52 '' + optionalString stdenv.isLinux ''
53 ldd $exe | grep libpthread
54 '' + optionalString stdenv.isDarwin ''
55 otool -L $exe |grep .dylib
61 meta.platforms = platforms.all;
64 # Used for debugging with nix repl
65 inherit project packages;
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