- Setup the binary cache -
cachix use mpickering
nix build -f https://github.com/mpickering/head.hackage/archive/master.tar.gz haskellPackages.ghc
or for a shell with GHC in
nix run -f https://github.com/mpickering/head.hackage/archive/master.tar.gz haskellPackages.ghc
nix build -I nixpkgs=https://github.com/mpickering/head.hackage/archive/master.tar.gz '(with import <nixpkgs> {}; haskellPackages.callHackage "haskell-src-exts" "1.20.2" {})'
nix build -I nixpkgs=https://github.com/mpickering/head.hackage/archive/master.tar.gz '(with import <nixpkgs> {}; haskellPackages.callCabal2nix "groups" ./groups-0.4.1.0 {})'
Either fix the dependencies like you would normally for a Haskell project on nix or you can contribute patches upstream to the head.hackage repo. For example:
nix build -f test.nix -I nixpkgs=https://github.com/mpickering/head.hackage/archive/master.tar.gz
# test.nix
with import <nixpkgs> {};
let
# Disable testing of comonad
hp = haskellPackages.extend(sel: sup: { comonad = haskell.lib.dontCheck sup.comonad; } );
in
hp.comonad
I tried the "For only GHC" instructions on OSX. It failed like so:
I'm assuming the important bit is