I thought I'd try to build ghcide myself, and quite possibly use it to experiment a bit with cachix late on. The following is the expression I came up with.
- Is it a reasonable way of building these packages?
- Will I run into any issues later on if I mix this build of ghcide with expressions for building packages based on "plain nixpkgs"? (I think not, since the result is an executable, so quite possibly I won't even have to match pin shas I suspect.)
In the code above I explicitly set the ghc version to be used. Is there some variable in nixpkgs that already holds the correct value for the "current" ghc version?
I thought I'd try to build
ghcide
myself, and quite possibly use it to experiment a bit withcachix
late on. The following is the expression I came up with.- Is it a reasonable way of building these packages?
- Will I run into any issues later on if I mix this build of
ghcide
with expressions for building packages based on "plain nixpkgs"? (I think not, since the result is an executable, so quite possibly I won't even have to match pin shas I suspect.)You'll want callHackage
Nice, but as so often documentation is lacking :disappointed:
What is an
AttrSet
actually?I'm guessing I have to use
AttrSet
to turn off checking, passing--no-check
to `cabal2nix, it's just that I don't know at all how to do that.I was thinking backwards... I don't want to pass in attrs, I want to run functions from
haskell.lib
on it. In the end it looks like this:In the code above I explicitly set the ghc version to be used. Is there some variable in
nixpkgs
that already holds the correct value for the "current" ghc version?pkgs.haskellPackages
Oh, an attrSet is basically just a dictionary / record in nix.
Use pkgs.haskell.lib.dontCheck function to add the dont-check to a haskell derivation.
@Ben Kolera What about
pkgs.haskellPackages
?That's the concept of the latest Haskell package set.
Yes.. I know.
I found a solution, a bit of a hack really, to the question about getting the GHC version in that specific format: