@@ -6,7 +6,7 @@
6with stdenv.lib;
6with stdenv.lib;
9− pkgSet = haskell.mkNewPkgSet {
9+ pkgSet = haskell.mkPkgSet {
10 inherit pkgs;
10 inherit pkgs;
11 pkg-def = import ./plan.nix;
11 pkg-def = import ./plan.nix;
12 pkg-def-overlays = [
12 pkg-def-overlays = [
@@ -33,16 +33,25 @@ in
34 # fixme: linux-specific
34 # fixme: linux-specific
35 printf "checking that executable is dynamically linked to system libraries... " >& 2
35 printf "checking that executable is dynamically linked to system libraries... " >& 2
36+ '' + pkgs.lib.optionalString pkgs.stdenv.isLinux ''
36− ldd "$exe" | grep libpthread
37+ ldd $exe | grep libpthread
37−
38+ '' + pkgs.lib.optionalString pkgs.stdenv.isDarwin ''
39+ otool -L $exe | grep "libSystem.B"
38 # fixme: posix-specific
41 # fixme: posix-specific
39 printf "checking that dynamic library is produced... " >& 2
42 printf "checking that dynamic library is produced... " >& 2
43+ '' + pkgs.lib.optionalString pkgs.stdenv.isLinux ''
40 sofile=$(find "${packages.project.components.library}" | grep -e '\.so$')
44 sofile=$(find "${packages.project.components.library}" | grep -e '\.so$')
45+ '' + pkgs.lib.optionalString pkgs.stdenv.isDarwin ''
46+ sofile=$(find "${packages.project.components.library}" | grep -e '\.dylib$')
41 echo "$sofile"
48 echo "$sofile"
43− printf "checking that dynamic library is dynamically linked to base... " >& 2
49+ printf "checking that dynamic library is dynamically linked to prim... " >& 2
50+ '' + pkgs.lib.optionalString pkgs.stdenv.isLinux ''
44− ldd "$sofile" | grep libHSbase
51+ ldd $sofile | grep libHSghc-prim
45−
52+ '' + pkgs.lib.optionalString pkgs.stdenv.isDarwin ''
53+ otool -L $sofile | grep libHSghc-prim
46 touch $out
55 touch $out