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 joined #haskell.nix
srk has quit [Ping timeout: 268 seconds]
srk has joined #haskell.nix
srk has quit [Ping timeout: 268 seconds]
srk has joined #haskell.nix
srk has quit [Ping timeout: 268 seconds]
srk has joined #haskell.nix
srk has quit [Ping timeout: 268 seconds]
srk has joined #haskell.nix
srk has quit [Ping timeout: 268 seconds]
srk has joined #haskell.nix
srk has quit [Ping timeout: 268 seconds]
srk has joined #haskell.nix
proofofkeags__ has quit [Ping timeout: 240 seconds]
__monty__ has joined #haskell.nix
hekkaidekapus} has joined #haskell.nix
hekkaidekapus{ has quit [Ping timeout: 268 seconds]
fendor has joined #haskell.nix
<ocharles> Should I be importing haskell.nix with nixpkgs-2009 or nixpkgs-2003?
<__monty__> ocharles: Fwiw, I never explicitly pass either.
<ocharles> How do you "get" haskell.nix then?
<__monty__> ocharles: This is my haskell.nix/nixpkgs pin, https://github.com/toonn/nix-config/blob/master/haskell.nix/nixpkgs.nix
<ocharles> Thanks
<__monty__> ocharles: And here's an example of a package using that pin, https://github.com/toonn/coldasdice/blob/master/default.nix
strikerlulu has quit [*.net *.split]
puffnfresh_ has quit [*.net *.split]
julm has quit [*.net *.split]
jD91mZM2 has quit [*.net *.split]
exarkun has quit [*.net *.split]
strikerlulu has joined #haskell.nix
exarkun has joined #haskell.nix
jD91mZM2 has joined #haskell.nix
julm has joined #haskell.nix
puffnfresh_ has joined #haskell.nix
phillip has joined #haskell.nix
<phillip> Hey all :) I build my project with pkgs.haskell-nix.project. I would like to use a postInstall phase to wrap my Haskell executable with wrapProgram to make other executables from the nix store available in the PATH, but I'm stuck with figuring out how to trigger it. It is ignored silently.
<__monty__> phillip: Which postInstall are you setting? `packages..components.exes..postInstall`?
aveltras has joined #haskell.nix
<phillip> to be honest it was simply a a `postInstall = ''` in the project derivation. I am a little bit confused by the documentation. Where would I set the packages..componentes.exes..postInstall? It doesn't seem to belong in the project derivation.
<michaelpj> ocharles: latest nixpkgs is best nixpkgs
<michaelpj> we're doing most testing on 20.09 now, so it's going to be the most reliable
<michaelpj> phillip: use the `modules` argument. Something like `modules = [ { packages.myPackage.components.exes.myExe.postInstall = ...; } ]`
<ocharles> Ok, I'll use that. We do have our own nixpkgs pin, but adding the haskell.nix overlays doesn't seem to work - for example Firefox now fails to build
<ocharles> So I think I'm going to add an overlay to our nixpkgs which uses Haskell.nix "cleanly" (e.g., not our nixpkgs, not our overlays)
<michaelpj> ocharles: hmm, that sounds bad. could you open an issue for that anyway?
<michaelpj> FWIW we use our own pin and it's fine, but maybe we're just on an older pin that doesn't have the issue
<ocharles> I'm not sure it's worth investigating tbh. We have loads of overlays, an old 20.03 (I think?) revision
<michaelpj> part of the reason it's done with overlays is so you can glue it onto your own nixpkgs!
<ocharles> I wouldn't say it's worth the investigation tbh
<michaelpj> oh
<michaelpj> yeah, I don't care about 20.03 any more tbh :p
pjb has quit [Read error: Connection reset by peer]
<ocharles> Hmm, that is good, but as it caused Qt to rebuild, I don't think it adds much - seems like some very fundamental packages change
<michaelpj> frankly I think we should stop building for 20.03 even: if nixpkgs isn't supporting that far back, I don't think we should...
<ocharles> I would be fine with it just tracking the latest stable release
<ocharles> This is quite experimental as is!
pjb has joined #haskell.nix
<phillip> @michaelpj: Sorry, I am still stuck. `project` or `cabalProject` return a `pkgSet`, that already has `modules` applied, correct? Is then the only option to use `mkCabalProjectPkgSet` and construct this by hand? Is there an example somewhere? 😬
<michaelpj> phillip: it's an argument to `project`
<michaelpj> have a look around the `haskell.nix` repo
<phillip> @michaelpj Ah thank you very much. That worked. :)
<ptival[m]> does anyone have good tips for figuring out what went wrong when a cabal dependency is not found while `exactDeps` is set?
<michaelpj> ptival: is it by any chance a `build-tool-depends`?
<ptival[m]> it seems to be a `build-depends` behind a boolean flag
<ptival[m]> (I'm testing passing it unconditionally, but building the environment takes some time :) )
<ptival[m]> michaelpj: ah, indeed, it's actually complaining about a `build-tools` of that dependency (namely, `c2hs`)
<ptival[m]> thanks! so looking around, it seems like the current only solution is indeed to unset `exactDeps`?
<aveltras> is there a way to get haskell.nix to not error with a permission issue when there are files associated with root user in the project directory ? (the directory is gitignored)
<ptival[m]> aveltras: what function are you using for gathering the source?
<michaelpj> ptival: yes afaik. maybe you can just stuff it into the shell as an extra executable buildInput? I just gave up on exactDeps
<ptival[m]> yeah I think I just won't `exactDeps` at the moment, not a big problem, thanks for the info!
<michaelpj> dhess: do you have a nixpkgs branch which works with haskell.nix on big sur?
<ocharles> I'm trying to install `cabal-install` from Git with this: https://gist.github.com/ocharles/8199983f1e103a6c6d09f51d22b36e1a. But I get `attribute 'cabal-install' missing` -- any ideas?
<ocharles> I get a big plan that has lots of Cabal stuff, but no `cabal-install`
<ocharles> doh, the exe is of course cabal, not cabal-install.
<ocharles> I am, however, stuck on getting `cabal-fmt` to work with `hackage-tool`.
<__monty__> Hackage-tool?
<ocharles> Yea, the helper from overlays/tools.nix
<ocharles> The problem seems to be it trying to install Cabal, I think
<__monty__> ocharles: I use it through the `tools` attribute. `tools = { cabal = "3.2.0.0"; };`
<ocharles> This is cabal-fmt, not cabal
<__monty__> Just illustrating the use : )
<ocharles> Sorry, two issues reported above, but I got cabal working
<ocharles> Ok. I'm using hackage-tool fine for most other things, just stuck on this one
<ocharles> Ok, cracked it!
<__monty__> ocharles: Any reason your target requires cabal == 2.5?
<ocharles> Nope, neither me or michaelpj have a clue :) But I did manage to fix it, added a comment on the issue
<michaelpj> I never use `hackage-tool`, but that seems pretty weird nonetheless
<michaelpj> I just use `hackage-package` directly, IMO it's more straightforward
<ocharles> hackage-tool just calls that and then projects out the exe, so it's not really doing much more - but point taken
<__monty__> Yeah, extracting the exes is what makes it more comfortable : )
<michaelpj> I don't like magic :p
<__monty__> Weird that the cabal.project was the issue, since a lack of one is exactly interpreted as `packages: .`.
<ocharles> yea, super odd
<ocharles> I actually didn't think that was going to work
<dhess> michaelpj: Yes, I do. But I am *just* about to try upstream, as they just merged Python 3.8.7, which was the last missing piece as far as I know.
<dhess> One second.
<michaelpj> upstream nixos-unstable, or 20.09?
<dhess> master
<dhess> I don't have a 20.09, sorry. My fork (which does work) is based on nixpkgs-unstable
<dhess> but I think I can probably deprecate that fork now that Python 3.8.7 is merged. Testing that as we speak
<michaelpj> well, I'm somewhat resigned to having to follow unstable or something if we try to do this
<michaelpj> it just doesn't look like 20.09 is going to get to a usable state any time soon
<dhess> same.
<dhess> Yes, I can confirm that https://github.com/NixOS/nixpkgs/commit/90b88c416d4d2f1ac2ebc9f14552dd4c4cd7928e works with GHC 8.10.3 from haskell.nix on Big Sur.
<dhess> my haskell.nix pin is ... 0f7c5afc41ad315824271ef7f7357e3a8da9908a
<dhess> I was able to build GHC 8.6.5 and GHC 8.8.4 from haskell.nix using the same pins (on x86_64-darwin and x86_64-linux). I haven't tested those yet on Big Sur, but I don't expect there would be any issues.
<ocharles> Thanks dhess. I did ultimately get it working, but good to see another approach!
<dhess> oh ok cool
<dhess> michaelpj: GHC 8.8.4 and GHC 8.6.5 also work.
<michaelpj> dhess: thanks!
hekkaidekapus} has quit [Ping timeout: 268 seconds]
hekkaidekapus} has joined #haskell.nix
aveltras has quit [Quit: Connection closed for inactivity]
joshmeredith has quit [Ping timeout: 264 seconds]
joshmeredith has joined #haskell.nix
__monty__ has quit [Quit: leaving]
fendor has quit [Remote host closed the connection]