nh2 / static-haskell-nix

easily build most Haskell programs into fully static Linux executables
388 stars 36 forks source link

survey: statify: Remove hardcoded link of zlib+ncurses #42

Closed nh2 closed 5 years ago

nh2 commented 5 years ago

Building xmonad worked fine with it, let's see what CI thinks about it.

nh2 commented 5 years ago

Looks like at least cabal is unhappy with it:

https://circleci.com/gh/nh2/static-haskell-nix/45

Linking dist/build/cabal/cabal ...
/nix/store/ljx5sayk6w0bpd1ahcf0rm5fj55cqafd-binutils-2.31.1/bin/ld: cannot find -lz
nh2 commented 5 years ago

I should give another shot at removing zlib once I've merged https://github.com/nh2/static-haskell-nix/commit/4f57531b726331900844ed73d196191369c387bb#diff-5a873d92c00133aa8d3f0a425a93aac2R453, which (by not splitting the .a file into its own output zlib.static, https://github.com/NixOS/nixpkgs/pull/66490) should make the zlib.pc pkg-config file work as expected.

This might help in the task of not having to give -lz manually.

nh2 commented 5 years ago

I found that I can't remove ncurses because ghc depends on it, but -lz in #44, see https://github.com/nh2/static-haskell-nix/pull/44/commits/f9bdfa0a481cd1b97f4450c3ca21e98a32c6368a.