Closed freeman42x closed 6 years ago
This is due to ghc 8.4 support being added to hie. You can fix this by adding --stack-yaml=8.2.2.yaml
to the first of the two lines starting with $STACK2NIX
and removing the second line (because 8.0 support has been dropped by hie).
@noughtmare Is this correct?
#!/bin/sh
STACK2NIX=$(nix-build -A stack2nix)/bin/stack2nix
COMMIT=a4e21f43c94dfc253d07614e781347d657c86b9b
URL=https://github.com/haskell/haskell-ide-engine.git
$STACK2NIX --git-recursive --revision $COMMIT $URL > ghc-8.4.nix
$STACK2NIX --git-recursive --revision $COMMIT $URL --stack-yaml=stack-8.2.2.yaml > ghc-8.2.nix
It created ghc-8.2.nix correctly but failed on ghc-8.4.nix
It also fails for:
$STACK2NIX --git-recursive --revision $COMMIT $URL --stack-yaml=stack-8.4.2.yaml > ghc-8.4.nix
I think it might be a stack2nix issue.
Yeah, I'm not sure what causes the issue with 8.4, I thought it might be that the version of nixpkgs
used by hie-nix
doesn't support ghc 8.4.3
yet.
I'll look into this as soon as I'm done fixing most immediate issues on https://github.com/cachix/cachix
I think the issue is that stack opens a pure nix shell (https://stack.readthedocs.io/en/stable/nix_integration/#the-nix-shell). That causes stack to use the system nixpkgs. I have been able to build a 8.4.3 project using stack build --nix-path="nixpkgs=https://github.com/nixos/nixpkgs/archive/master.tar.gz"
. Maybe this could be fixed by allowing the user to supply a custom nix path to stack2nix, just like stack does?
Actually, running NIX_PATH=nixpkgs=https://github.com/nixos/nixpkgs/archive/master.tar.gz ./update.sh
works.
Now I get this when trying to install hie84:
$ nix-env -iA hie84 -f .
error: anonymous function at /home/jaro/hie-nix/ghc-8.4.nix:13086:10 called without required argument 'ghc-syb-utils', at /nix/store/gsccads7hyv2s5bksvpwgv0000qalzsk-3b1e15140c574c01ae25835b934fe71be3376877.tar.gz-unpacked/pkgs/development/haskell-modules/make-package-set.nix:88:27
GHC 8.4 support done in #18, waiting on stack2nix PR merges and release.
I changed the commit SHA to a4e21f43c94dfc253d07614e781347d657c86b9b and then run update.sh