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-hpack.doHaddock = false;
16 inherit compiler-nix-name;
17 src = testSrc "cabal-hpack";
21 packages = project.hsPkgs;
25 inherit (project) plan-nix;
28 run = stdenv.mkDerivation {
29 name = "cabal-hpack-test";
32 exe="${packages.cabal-hpack.components.exes.cabal-hpack}/bin/cabal-hpack${stdenv.hostPlatform.extensions.executable}"
34 size=$(command stat --format '%s' "$exe")
35 printf "size of executable $exe is $size. \n" >& 2
37 # fixme: run on target platform when cross-compiled
38 printf "checking whether executable runs... " >& 2
39 cat ${haskellLib.check packages.cabal-hpack.components.exes.cabal-hpack}/test-stdout
40 '' + (if stdenv.hostPlatform.isMusl
42 printf "checking that executable is statically linked... " >& 2
43 (ldd $exe 2>&1 || true) | grep -i "not a"
46 # Skip this on aarch as we do not have an `ldd` tool
47 optionalString (!stdenv.hostPlatform.isAarch32 && !stdenv.hostPlatform.isAarch64) (''
48 printf "checking that executable is dynamically linked to system libraries... " >& 2
49 '' + optionalString stdenv.isLinux ''
50 ldd $exe | grep libpthread
51 '' + optionalString stdenv.isDarwin ''
52 otool -L $exe |grep .dylib
58 meta.platforms = platforms.all;
61 # Used for debugging with nix repl
62 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