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
pjb has joined #haskell.nix
pjb has quit [Remote host closed the connection]
pjb has joined #haskell.nix
srk has quit [*.net *.split]
hekkaidekapus_ has quit [*.net *.split]
srk has joined #haskell.nix
hekkaidekapus_ has joined #haskell.nix
srk has quit [Ping timeout: 268 seconds]
srk has joined #haskell.nix
srk has quit [Remote host closed the connection]
srk has joined #haskell.nix
ptival[m] has quit [*.net *.split]
Ericson2314 has quit [*.net *.split]
domenkozar[m] has quit [*.net *.split]
ptival[m] has joined #haskell.nix
Ericson2314 has joined #haskell.nix
domenkozar[m] has joined #haskell.nix
ptival[m] has quit [Ping timeout: 258 seconds]
Ericson2314 has quit [Ping timeout: 242 seconds]
domenkozar[m] has quit [Ping timeout: 242 seconds]
Poscat[m] has quit [Ping timeout: 246 seconds]
michaelpj has quit [Ping timeout: 260 seconds]
stites[m] has quit [Ping timeout: 240 seconds]
jonge[m] has quit [Ping timeout: 240 seconds]
siraben has quit [Ping timeout: 240 seconds]
hekkaidekapus{ has joined #haskell.nix
hekkaidekapus_ has quit [Ping timeout: 268 seconds]
siraben has joined #haskell.nix
__monty__ has joined #haskell.nix
domenkozar[m] has joined #haskell.nix
stites[m] has joined #haskell.nix
michaelpj has joined #haskell.nix
Ericson2314 has joined #haskell.nix
jonge[m] has joined #haskell.nix
ptival[m] has joined #haskell.nix
Poscat[m] has joined #haskell.nix
fendor_ has joined #haskell.nix
fendor has quit [Ping timeout: 246 seconds]
pjb has quit [Ping timeout: 272 seconds]
alexarice[m] has joined #haskell.nix
<ocharles> Woo, got haskell.nix compiling all our stuff. Almost able to switch to it, just need to get doctests working. It does unfortunately take our Hydra evaluation time from 2mins to 6mins though (without materialization)
<alexarice[m]> Hi, has anyone had problems trying to compile libraries with non trivial `Setup.hs`. I'm trying to compile agda using haskell.nix and the setup.hs file contains instructions to build some agda files once agda has finished building. However this fails because of not being able to find the agda executable
<alexarice[m]> (This is building from a stack file)
<michaelpj> ocharles: that's pretty short, ours takes way longer than that lol
<michaelpj> alexarice: I spent a *long* time making Agda work. Fortunately, you can just steal my work: https://github.com/input-output-hk/plutus/blob/master/nix/pkgs/haskell/extra.nix#L25
<michaelpj> their custom setup only works if you're using old-style builds, basically
<alexarice[m]> michaelpj: ah brilliant, I'm hoping to get some different versions working and nixpkgs runs into a lot of problems with the package set they use
<michaelpj> it's quite annoying
<michaelpj> I meant to open an upstream issue but I never got around to it...
<alexarice[m]> so you effectively tell the package to ignore it's custom config and then rewrite it?
<michaelpj> yup
<michaelpj> believe me, I spent a long time trying to come up with a better way
<alexarice[m]> michaelpj: I believe you, I'll have a look at what you did but I've only just heard of haskell.nix for the first time about 3 hours ago so I might be quite slow
<michaelpj> alexarice: your summary a moment ago was spot on, so you're a quick study ;)
<alexarice[m]> Does hackage-package pull in source from hackage? I'm hoping to compile a development version so will this `modules` code work with some other similar functions?
<michaelpj> alexarice: yep. You can do a manual `cabalProject` call with a `fetchFromGitHub` source and it takes the same `modules` argument
<alexarice[m]> right, thanks so much for the help, Don't think I'd have ever figured this out by myself.
<michaelpj> alexarice: although I was just poking around and it looks like https://github.com/agda/agda/commit/5dd036739690e583b998b80cd873d8d4209f0766#diff-95d596561bc01292f2cebe1ecbabf44af34eaee24a244de568e6489814ffcb0b changed the setup hook behaviour
<michaelpj> so maybe it would work now? Not sure
<alexarice[m]> I'm using a version with that change so no
<alexarice[m]> `/build/agda/dist/build/agda/agda: rawSystem: runInteractiveProcess: exec: does not exist (No such file or directory)`
<alexarice[m]> It can't find the agda executable anyway
<alexarice[m]> This is using `stackProject` instead of `cabalProject` though
<alexarice[m]> maybe I hit a different problem?
<michaelpj> maybe
<michaelpj> have you tried doing what I did?
<alexarice[m]> <michaelpj "have you tried doing what I did?"> I'm trying cabalProject first and if that fails then I'll try adding what you put
<alexarice[m]> it takes about 10-15 minutes to build each time though
<michaelpj> yeah it's really annoying
<michaelpj> it takes forever to build and then it fails at the end :sob:
<alexarice[m]> <michaelpj "it takes forever to build and th"> yeah I was trying to print out some of the directory information in the setup file but having to compile the whole thing again to have another go was painful
aveltras has joined #haskell.nix
<ocharles> michaelpj: oof. At least 6+ minutes per commit is too much for me! I'll see if there's anything obvious
<ocharles> I've already noticed that our main jobset doesn't seem to have as much sharing as I expected (a bunch of our hackage tools like cabal-fmt appear twice in the trace, so are presumably being evaluated multiple times)
<ocharles> maybe there's similar sharing opportunities inside haskell.nix
<michaelpj> ocharles: this can be a bit misleading from the derivation names. Everything gets a derivation to build some config files, there's a derivation per-component, there's derivations per haddock etc.
<michaelpj> I'd be surprised if we actually built the same library twice
<ocharles> Yea, I don't think you (haskell.nix) are, I think our CI is just importing our `./nix/pkgs` multiple times, which obviously won't share anything
<ocharles> I mean it'll share build results, sure, but it will still have to do all the evaluation work to get to derivations
<ocharles> I mean sharing in a thunk sense
<alexarice[m]> michaelpj: now fails on tests with "The AGDA_BIN environment variable is not set." Did you manage to disable tests?
<michaelpj> ocharles: yeah, I recommend not importing your project multiple times :D
<michaelpj> alexarice: I don't think I disabled tests... but why are you *building* the tests? what derivation are you building?
<alexarice[m]> I just did `nix-build -A Agda`
<alexarice[m]> should I be doing `nix-build -A Agda.components.exes. something`
<michaelpj> yeah
<michaelpj> this is a trap
<alexarice[m]> right, the nix expression built now
<alexarice[m]> will see if it works
<alexarice[m]> luckily didn't need to recompile again
<alexarice[m]> looks promising, thanks for all the help again
<ocharles> Does materialization make much of a difference to people? I'm seeing like a few seconds different (over about 2 minutes)
<michaelpj> ocharles: IMO the big win is pinning the plan sha, since that makes it a FOD and avoids you having to re-run `cabal configure` every time you eval
<michaelpj> arguably full materialization is easier to update than just pinning the sha
<michaelpj> and IME hydra is especially slow at evaluation-time work
<ocharles> We don't actually use Hydra, but use http://github.com/circuithub/nix-buildkite
<ocharles> Which basically just calls nix-instantiate to generate a JSON object of derivations, then we `nix-store -r` each one, and add Buildkite dependencies between each job
<ocharles> But I don't see cabal configure running every time without plan-sha specified (but maybe it runs and doesn't produce output?)
mightyby1e has joined #haskell.nix
<mightyby1e> I've got a question about materialization
<mightyby1e> I'm getting this error:
<mightyby1e> To make project.stack-nix for myproj a fixed-output derivation but not materialized, set `stack-sha256` to the output of the 'calculateMaterializedSha' script in 'passthru'.
<mightyby1e> Where is this calculateMaterializedSha script?
stuebinm has joined #haskell.nix
qz has joined #haskell.nix
stuebinm has quit [Quit: stuebinm]
fendor_ has quit [Remote host closed the connection]