deech / fltkhs

Haskell bindings to FLTK GUI toolkit.
MIT License
190 stars 24 forks source link

unable to run basic example under nix #159

Open zoranbosnjak opened 5 years ago

zoranbosnjak commented 5 years ago

Steps to reproduce:

nix-channel --update
nix-env --upgrade
git clone https://github.com/deech/fltkhs-hello-world.git
cd fltkhs-hello-world/
cabal2nix --shell . > shell.nix
nix-shell
runhaskell -Wall src/hello-world.hs

It fails with the following error:

hello-world.hs: <command line>: can't load .so/.DLL for: /nix/store/pf87mjvij555an8693knn0846hfprvgq-fltkhs-0.8.0.2/lib/ghc-8.6.5/x86_64-linux-ghc-8.6.5/libHSfltkhs-0.8.0.2-GIFoDRNrKJ515glQJcJQyn-ghc8.6.5.so (/nix/store/pf87mjvij555an8693knn0846hfprvgq-fltkhs-0.8.0.2/lib/ghc-8.6.5/x86_64-linux-ghc-8.6.5/libHSfltkhs-0.8.0.2-GIFoDRNrKJ515glQJcJQyn-ghc8.6.5.so: undefined symbol: Fl_Adjuster_New)

The same problem is with any compiled program which depends on fltkhs. It fails in runtime with the same error.

deech commented 5 years ago

fltkhs does not currently work with Nix and the cabal2nix utility fails because it has a non-trivial Setup.hs Cabal build script.

I know almost nothing about Nix and it would be great to get it working so contributions are welcome.