on master help sign in
Update macOS specific install instructions

For installing Cocoa framework.

commita43818d0d8b44d768d461980e2f3279265797b22 authorHarendra Kumar <harendra@composewell.com> dateWed 28 Jul 2021, 17:30 (5 years ago) parent7b5bc73
1 file changed+33−6
docs/building.md+33−6
docs/building.md+33−6
@@ -99,11 +99,38 @@ Features/modules may get disabled if the kernel/OS does not support it.
9999
100100### Linux
101101
102−* File system events notification module is supported only for kernel versions
103− 2.6.36 onwards.
102+File system events notification module is supported only for kernel versions
103+2.6.36 onwards.
104104
105−### Mac OSX
105+### macOS
106106
107−* File system events notification module requires macOS 10.7+ with
108− Xcode/macOS SDK installed (depends on `Cocoa` framework). However, we only
109− test on latest three versions of the OS.
107+File system events notification module supports macOS 10.7+ . You must
108+have the ``Cocoa`` framework installed which is supplied by the macOS
109+SDK. If ``Cocoa`` is not installed, you may see an error like this:
110+
111+```
112+error: ld: framework not found Cocoa
113+```
114+
115+### Native build
116+
117+Usually, if you have a working GHC you would already have the SDK
118+installed. See the documentation of `Xcode` or `xcode-select` tool for
119+more details.
120+
121+### Nix build
122+
123+Please note that cabal2nix may not always be able to generate a complete nix
124+expression on `macOS`. See [this
125+issue](https://github.com/NixOS/cabal2nix/issues/470).
126+
127+You may need to add ``nixpkgs.darwin.apple_sdk.frameworks.Cocoa`` to
128+your ``buildInputs`` or ``executableFrameworkDepends``. Something like
129+this:
130+
131+```
132+executableFrameworkDepends =
133+ if builtins.currentSystem == "x86_64-darwin"
134+ then [nixpkgs.darwin.apple_sdk.frameworks.Cocoa]
135+ else [];
136+```