2{ stdenv, util, cabalProject', haskellLib, recurseIntoAttrs, testSrc, compiler-nix-name }:
9 # Package has no exposed modules which causes
10 # haddock: No input file(s)
11 packages.cabal-sublib.doHaddock = false;
15 # The ./pkgs.nix works for linux & darwin, but not for windows
16 project = cabalProject' {
17 inherit compiler-nix-name;
18 src = testSrc "cabal-sublib";
22 packages = project.hsPkgs;
26 inherit (project) plan-nix;
28 run = stdenv.mkDerivation {
29 name = "cabal-sublib-test";
32 exe="${packages.cabal-sublib.components.exes.cabal-sublib}/bin/cabal-sublib${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-sublib.components.exes.cabal-sublib}/test-stdout
42 # Musl and Aarch are statically linked..
43 optionalString (!stdenv.hostPlatform.isAarch32 && !stdenv.hostPlatform.isAarch64 && !stdenv.hostPlatform.isMusl) (''
44 printf "checking that executable is dynamically linked to system libraries... " >& 2
45 '' + optionalString (stdenv.isLinux && !stdenv.hostPlatform.isMusl) ''
46 ldd $exe | grep libgmp
47 '' + optionalString stdenv.isDarwin ''
48 otool -L $exe |grep .dylib
54 meta.platforms = platforms.all;
57 # Used for debugging with nix repl
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