-
-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fails to link against tinfo (ncurses5) #14
Comments
`nix/static` is a plain `nixpkgs` setup, and almost builds a static version of the binary, if it were not for nh2/static-haskell-nix#14 `nix/` is using the tooling at https://github.com/input-output-hk/iohk-nix as advised by @angerman, but it currenty fails to download or build `/nix/store/j6m77ilz08bsdhs8cba9i0mhs4lw0vak-ghc-8.4.4.drv` because some patches do not apply. Or something.
A work-around is to compile the |
requires a patched `haskell.nix` due to input-output-hk/haskell.nix#86 and disabled `terminfo` support in `haskelline` due to nh2/static-haskell-nix#14 But it seems to work!
Check out commit 76d2cd3. All that was needed was static-haskell-nix/survey/default.nix Lines 629 to 634 in 76d2cd3
I could then build it with
Since I have commited this, you can now build it the same way, and I have also uploaded it to the cachix. (If you add For clarity, it is also possible to do this without adding code to static-haskell-nix/static-stack/default.nix Lines 38 to 42 in 76d2cd3
|
I've also uploaded the static result: https://github.com/nh2/static-haskell-nix/releases/tag/tttool-static 7.7 MB uncompressed. |
In other words, because you use |
Thanks for the fix and explanation! I also managed to build it statically using |
@nomeata Can plain nixpkgs not give Windows builds? Must one switch to |
Haven't tried recently, back then they had a fair amount of patches for cross compilation onto Windows that were not in upstream nixpkgs yet. |
I believe that all |
I am trying to build https://travis-ci.org/entropia/tip-toi-reveng/ statically using these instructions, and I made good progress by pinning
nixpkgs
to version NixOS/nixpkgs@2c07921 (which is the one mentioned in theREADME
) and then bulidingpkgs.pkgsMusl.haskell.packages.ghc843.tttool
.And indeed, as long as I stub out uses of
TemplateHaskell
in my program (it it expected that this is needed?), it builds… almost: It fails linkingBlindly cargo-culting the example scotty app, I tried adding the following to my
project.nix
but it did not make a difference (and there was already a
--extra-lib-dirs=/nix/store/1xwbnc903gymfi99zpvj8mdp5601yqz6-ncurses-6.1/lib
commde line argument passed automatically somehow).Is it maybe dubious that https://github.com/NixOS/nixpkgs/blob/2c07921cff84dfb0b9e0f6c2d10ee2bfee6a85ac/pkgs/development/libraries/ncurses/default.nix starts with
The text was updated successfully, but these errors were encountered: