hekkaidekapus has quit [Remote host closed the connection]
hekkaidekapus has joined #haskell.nix
<michaelpj>
typetetris: I lied to you when I said you couldn't materialize the tools stuff: you can pass in extra arguments to the call and it will get forwarded through to the relevant `cabalProject` call, so you can materialize things "normally"
EncodePanda has joined #haskell.nix
<EncodePanda>
Hello, at work we developed project with haskell.nix. I'm trying to run profiler against my program at work in the following way:cabal run app --enable-profiling -- +RTS -P Problem: Program does not compile. I get compilation errors like:
<michaelpj>
ProofTechnique: that's not really an intended usecase. you can probably hack something together. There are some package sets built from stackage snapshots in the haskell.nix overlay you could use
<EncodePanda>
" Perhaps you haven't installed the profiling libraries for package 'random-1.1'?"
<EncodePanda>
On the webs I've found that ppl run cabal reinstall package_name for all packages
<EncodePanda>
in which they override mkDerivation fo each package that they use
<EncodePanda>
I can not possible the only person running into this that is using haskell.nix :)
<EncodePanda>
How do you folks resolve this. What's the best approach.
<michaelpj>
EncodePanda: you're working inside a nix-shell, right? that means haskell.nix has built all the dependencies of your project for you, not cabal. So you need to tell it that you want profiling libraries too. Normally you should just be able to set this in `cabal.project`, but something is wrong with the profiling config getting through (https://github.com/input-output-hk/haskell.nix/issues/887), so you'll need to enable
<michaelpj>
it as a module option for your project. Find the `cabalProject` or similar call, there should be a `modules` argument with a bunch of stuff in it, add `enableLibraryProfiling = true; enableExecutableProfiling = true` and rebuild your shell
<michaelpj>
we should have a doc section about this, it's a common desire
<EncodePanda>
let me have a look
<EncodePanda>
michaelpj if I manage to get this done I promise to PR the docs :)
<michaelpj>
:)
<EncodePanda>
give me few minutes to process what you wrote