codygman has quit [Read error: Connection reset by peer]
codygman has joined #haskell.nix
codygman has quit [Read error: Connection reset by peer]
codygman has joined #haskell.nix
acarrico has quit [Ping timeout: 260 seconds]
fendor has joined #haskell.nix
__monty__ has joined #haskell.nix
<ocharles>
I'm playing around with my own plan-to-nix type thing, and I'm curious - how have you managed to work around the fact that 'cabal configure' with a project that has source-repos needs network access to run?
<ocharles>
I'm having to use `--option sandbox false`, but I never had to do that with haskell.nix
<__monty__>
I remember seeing something about adding hashes as comments to stack.yaml, maybe there's a similar way to turn the repos into fixed-output derivations?
fendor has quit [Read error: Connection reset by peer]
fendor has joined #haskell.nix
<michaelpj>
ocharles: we get the user to supply us with a lookup function for the sha256s for source repos, then we patch the `cabal.project` to point it at local copies so cabal is happy. It's kind of ugly, but it works
<ocharles>
So that's why you need the --sha256 thing
domenkozar[m] has quit [Quit: killed]
jonge[m] has quit [Quit: killed]
Ericson2314 has quit [Quit: killed]
michaelpj has quit [Quit: killed]
ptival[m] has quit [Quit: killed]
siraben has quit [Quit: killed]
michaelpj has joined #haskell.nix
<michaelpj>
yeah, although these days I recommend that people pass the `sha256Map` to `cabalProject` instead, IMO that's nicer than modifying the `cabal.project` for nix-only stuff
<ocharles>
What I'm trying to do is turn plan.json into a nixpkgs overlay (ala the haskellPackages in nixpkgs)
<ocharles>
And for the most part, this seems to work well
<ocharles>
(This will at least let us move work to have Cabal in charge of choosing packages, making the step to haskell.nix smaller)
<michaelpj>
i.e. you're currently using the nixpkgs infra and you want something similar?
<michaelpj>
I reckon you could hack up something in `haskel.nix` to make such an overlay too, not sure if that would suit your purposes
<ocharles>
Yea, I just generate an overlay compatible with haskellPackages that is a bunch of `callCabal2nix` calls
<ocharles>
It seems to be working so far, our main API server project has almost built with all dependencies built from scratch
<michaelpj>
I mean, if you did a haskell.nix `cabalProject` call for your cabal file, and then merged all the packages so they weren't split components, then you'd have more-or-less what you want
jonge[m] has joined #haskell.nix
ptival[m] has joined #haskell.nix
Ericson2314 has joined #haskell.nix
siraben has joined #haskell.nix
<ocharles>
well haskell.nix is not currently able to build the project
<ocharles>
that's part of the problem
<ocharles>
So this commit lets me at least use Cabal as a solver, which is compatible with haskell.nix. Then I can work on getting haskell.nix to work (it's about 95% there, I forget what exactly doesn't work atm)
<michaelpj>
okay fair enough
<michaelpj>
I'm impressed your one got working so fast! This stuff can be a real can of worms...