angerman changed the topic of #haskell.nix to: https://input-output-hk.github.io/haskell.nix - alternative haskell infrastructure for nix; logs at https://logs.nix.samueldr.com/haskell.nix
proofofkeags has quit [Ping timeout: 252 seconds]
<angerman> jackdk: that's kinda odd though :-/ however it's just a warning. And you really want to set both -lssl and -lcrypto flags, and ideally repeat them.
<angerman> linking is for almost all linker order based, unless you use (and the linker supports) some form of recursive linking e.g. \( -lfoo -lbar \)
<jackdk> angerman: also gold said `/nix/store/.../bin/x86_64-unknown-linux-musl-ld.gold: error: cannot find -lssl`; am I missing some -L option somewhere?
<angerman> jackdk: yes that's kinda odd, if it declares ssl as a dependency, the system libray mapping should bring the libraries into scope via -L
<jackdk> angerman: so hw-kafka-client only declared rdkafka as a dependency, and does so using extra-libraries, not pkgconfig-depends, so I suspect it's not getting picked up by haskell.nix
<angerman> i don't see rdkafka in there, I'm a bit confused how haskell.nix didn't warn about not being able to resolve rdkafka ?
<jackdk> angerman: hw-kafka-client declares rdkafka, which is its nixpkgs name so I think that resolves. but then it doesn't declare transitive libs which i think is the problem here
<angerman> ohh right. if the name matches that might work.
<angerman> jackdk: you did try adding the crypto libs to the extra-lirbaries, right?
<jackdk> angerman: yes, but only on my package that depends on hw-kafka-client. I may try switching hw-kafka-client to pkgconfig-depends
<jackdk> (in addition to what you suggested)
<angerman> not sure pkgconfig would help much.
<angerman> jackdk: you could amend https://github.com/input-output-hk/haskell.nix/blob/master/lib/system-nixpkgs-map.nix in your local haskell.nix copy to map rdkafka to rdkafka + the crypto libs.
<jackdk> angerman: the reason I think of pkgconfig-depends is that the rdkafka.pc file has `Requires.private: zlib libcrypto libssl libsasl2` so it actually declares its depends
<angerman> fair
<jackdk> (not that it worked, but it was worth a shot)
<jackdk> angerman: this is absolutely disgusting: `ghc-options: -optl-lssl -optl-lcrypto` (straight `-lssl -lcrypto` puts them too early in the linker commandline) _and_ `extra-libraries: ssl` (so haskell.nix adds the library paths)
<angerman> yuck... yea ghc could use some ordering feature where you could select where in the linker phase the library would end up.
<jackdk> angerman: less disgusting is `extra-libraries: rdkafka ssl crypto` which reiterates the `-lrdkafka` but ensures `-lssl -lcrypto` after it
<jackdk> I'll probably go with that, because I don't have it in me to fight this harder. TYVM for your help
<angerman> good luck :-)
<jackdk> angerman: https://github.com/haskell/cabal/issues/7399 I think I found the root cause
<angerman> jackdk: wow...
* craige whistles
<angerman> jackdk: in haskell.nix you could fix it by adding the libs to the system-nixpkgs-map
<craige> Would I be correct in thinking that Hakyll is not available via haskell.nix angerman ?
<angerman> craige: is it on hackage? then it's in haskell.nix.
<angerman> craige: otherwise if it has a website, you can fetch the source and run cabalProject on it :D
<jackdk> angerman: adding `rdkafka = [ rdkafka openssl ];` to the system-nixpkgs-map doesn't help, because nothing is telling the linker to `-lssl` etc
<craige> That's what I thought. Them I'll go back to working out what I'm doing wrong where I can pull in other things from `hackage`but not Hakyll :-)
<angerman> jackdk: odd.
<angerman> craige: is your haskell.nix (by extension hackage.nix) recent enough?
<angerman> though I'd guess hakyll would be in there for a long time...
<jackdk> angerman: why? the only declared `extra-libraries` in `hw-kafka-client` is `rdkafka`
<jackdk> (and even if i change that to `pkgconfig-depends` it doesn't help because of that cabal bug
<craige> As fresh as can be.
<angerman> jackdk: fair. it would probably just bring it into scope :-/
<jackdk> angerman: indeed.
* craige is also toying with the haskell.nix flakes feature.
<angerman> craige: something like this: `hello = (pkgs.haskell-nix.hackage-package { name = "hello"; version = "1.0.0.2"; inherit compiler-nix-name; }).getComponent "exe:hello";` except with hakyll :D
<angerman> craige: I'm afraid I haven't used the flakes part yet. And I'm still not certain it won't bust our cross logic :(
<craige> It's worked for the most part :-)
<craige> I'm wanting hakyll as a tool to build a site, see: https://source.mcwhirter.io/craige/mcwhirter.io/src/branch/flakify/flake.nix for a more detailed mess (I've been through a few iterations)
<craige> If I `s/hakyll/xmonad/` on line 49 then it successfully tries to build `xmonad`. With `hakyll` it claims `error: attribute 'hakyll' missing`.
<angerman> hmm... I'm not sure what's up with tools, but you could try the line above I posted separate.
<angerman> hello = (pkgs.haskell-nix.hackage-package { name = "hakyll"; version = "4.14.0.0"; compiler-nix-name = "ghc8104"; }).getComponent "exe:hakyll";
jb3 has joined #haskell.nix
jb3 has quit [Ping timeout: 252 seconds]
jb3 has joined #haskell.nix
<craige> I'll give thata crack.
<craige> Add that line evaluates at least. Is this worth further investigation or should I just tick the box and keeping with my pet projects? 😃
<craige> So that did work of sorts - it got me back to the error that I started with: `Couldn't match expected type ‘Maybe Exp’ with actual type ‘Exp’` for `file-embed` so I'm going to say that worked 🤣
__monty__ has joined #haskell.nix
jb3 has quit [Ping timeout: 252 seconds]
siraben has quit [Ping timeout: 245 seconds]
angerman has quit [Ping timeout: 260 seconds]
ProofTechnique has quit [Ping timeout: 276 seconds]
ProofTechnique has joined #haskell.nix
siraben has joined #haskell.nix
angerman has joined #haskell.nix
proofofkeags has joined #haskell.nix
proofofkeags has quit [Ping timeout: 265 seconds]
proofofkeags has joined #haskell.nix
fendor has joined #haskell.nix
fendor has quit [Ping timeout: 268 seconds]
__monty__ has quit [Quit: leaving]
NinjaTrappeur has quit [Ping timeout: 250 seconds]
NinjaTrappeur has joined #haskell.nix