File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -146,20 +146,24 @@ For non-Haskell dependencies that are linkable libraries, add them to:
146146` ` ` yaml
147147extra-libraries:
148148- mnl
149+ - z
149150` ` `
150151
151- The name of these libraries is the suffix of the C linking option `-lmnl` giving you `mnl`.
152+ The name of these libraries is the suffix of the `gcc` linking option :
153+
154+ * `-lmnl` giving you `mnl`
155+ * `-lz` giving you `z` for the zlib library.
152156
153157They will be will available to `nix-build` and `nix-shell`. The `cabal configure` will automatically find them and link them during compilation.
154158
155- Sometimes these non-Haskell dependencies have names that conflict with Haskell dependencies of the same name .
159+ These non-Haskell dependencies must be explicitly named when using `callPackage` .
156160
157- To resolve this, override explicitly when using `callPackage`. This is done in both `shell.nix` and `release.nix`.
161+ This is done in both `shell.nix` and `release.nix`.
158162
159163For example :
160164
161165` ` ` nix
162- haskellPackages.callPackage ./cabal.nix { hello = pkgs.hello; mnl = pkgs.libmnl; }
166+ haskellPackages.callPackage ./cabal.nix { hello = pkgs.hello; mnl = pkgs.libmnl; z = pkgs.zlib; }
163167` ` `
164168
165169# # Using GHCi (or `cabal repl` or `stack ghci`)
You can’t perform that action at this time.
0 commit comments