@@ -0,0 +1,50 @@
9+ pkgSet = haskell.mkNewPkgSet {
11+ pkg-def = import ./plan.nix;
13+ { project = ./project.nix; }
18+ packages = pkgSet.config.hsPkgs;
21+ stdenv.mkDerivation {
22+ name = "cabal-22-test";
25+ exe="${packages.project.components.exes.project}/bin/project"
27+ size=$(command stat --format '%s' "$exe")
28+ printf "size of executable $exe is $size. \n" >& 2
30+ # fixme: run on target platform when cross-compiled
31+ printf "checking whether executable runs... " >& 2
34+ # fixme: linux-specific
35+ printf "checking that executable is dynamically linked to system libraries... " >& 2
36+ ldd "$exe" | grep libpthread
38+ # fixme: posix-specific
39+ printf "checking that dynamic library is produced... " >& 2
40+ sofile=$(find "${packages.project.components.library}" | grep -e '\.so$')
43+ printf "checking that dynamic library is dynamically linked to base... " >& 2
44+ ldd "$sofile" | grep libHSbase
49+ meta.platforms = platforms.all;
50+} // { inherit (packages) project; }