@@ -22,7 +22,35 @@ with rec {
22 hsPkgs = pkgs.haskellPackages // { ${e.package.identifier.name} = null; };
22 hsPkgs = pkgs.haskellPackages // { ${e.package.identifier.name} = null; };
23 # We also need to do some system pkgs -> haskell pkgs
23 # We also need to do some system pkgs -> haskell pkgs
24 # resolution.
24 # resolution.
25− pkgs = pkgs // { };
25+ pkgs = pkgs
26+ # fetchgit should always come from the buildPackages
27+ # if it comes from the targetPackages we won't even
28+ # be able to execute it.
29+ // { fetchgit = pkgs.buildPackages.fetchgit; }
30+ # haskell lib -> nix lib mapping
31+ // { crypto = pkgs.openssl;
32+ "c++" = null; # no libc++
35+ pthread = null; # available by default
38+ // { advapi32 = null; gdi32 = null; imm32 = null; msimg32 = null;
39+ shell32 = null; shfolder = null; shlwapi = null; user32 = null;
41+ kernel32 = null; ws2_32 = null;
43+ ssl32 = null; eay32 = pkgs.openssl;
45+ iphlpapi = null; # IP Help API
47+ msvcrt = null; # this is the libc
52+ // pkgs.darwin.apple_sdk.frameworks;
26 # package-conf mappings.
54 # package-conf mappings.
27 # pkgconfig name -> nix package
55 # pkgconfig name -> nix package
28 pkgconfPkgs = { libpcre = pkgs.pcre; };
56 pkgconfPkgs = { libpcre = pkgs.pcre; };
@@ -64,7 +92,7 @@ let expr = expr0 flags;
64 } // pkgs.lib.optionalAttrs (builtins.hasAttr pname expr.components) {
92 } // pkgs.lib.optionalAttrs (builtins.hasAttr pname expr.components) {
65 libraryHaskellDepends = expr.components.${pname}.depends or [];
93 libraryHaskellDepends = expr.components.${pname}.depends or [];
66 libraryPkgconfigDepends = expr.components.${pname}.pkgconfig or [];
94 libraryPkgconfigDepends = expr.components.${pname}.pkgconfig or [];
67− librarySystemDepends = expr.components.${pname}.libs or [];
95+ librarySystemDepends = (expr.components.${pname}.libs or []) ++ pkgs.lib.optionals (os == "Osx") (expr.components.${pname}.frameworks or []);
68 libraryToolDepends = expr.components.${pname}.build-tools or [];
96 libraryToolDepends = expr.components.${pname}.build-tools or [];
69 } // pkgs.lib.optionalAttrs (builtins.hasAttr "exes" expr.components) {
97 } // pkgs.lib.optionalAttrs (builtins.hasAttr "exes" expr.components) {
70 executableHaskellDepends = collectAttr "depends" expr.components.exes;
98 executableHaskellDepends = collectAttr "depends" expr.components.exes;