input-output-hk / input-output-hk/stack2nix

How to deal with missing ghc version on Nix?

Open
#166 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Nix
Stars
100
Forks
28
PR merge metrics
No merged PRs in 30d

Description

Try to convert [gloss](https://github.com/benl23x5/gloss) project to nix expression and got following error

```
$ stack2nix --version
stack2nix 0.2.2

$ stack2nix --stack-yaml stack-8.6.yaml . --verbose

Ensuring git version is >= 2 ...
Ensuring cabal version is >= 2 ...
stack2nix (isLocalRepo): True
stack2nix (projRoot): "."
stack2nix (argUri): "."
handleStackConfig (cwd): /data/learn/haskell/gloss
handleStackConfig (localDir): .
handleStackConfig (remoteUri): Nothing
handleStackConfig (alreadyExists): True
stack2nix: haskell.compiler.ghc861 failed to build via nix
CallStack (from HasCallStack):
error, called at src/Stack2nix/Util.hs:79:22 in stack2nix-0.2.2-EjYkwZMOavSKQ5oHK3VyZt:Stack2nix.Util
```

I am on NixOS but my channel no longer have `ghc861` for a very long time after many updates

```
$ nix-env -qaPA nixos.haskell.compiler
nixos.haskell.compiler.ghc822 ghc-8.2.2
nixos.haskell.compiler.integer-simple.ghc822 ghc-8.2.2
nixos.haskell.compiler.ghc822Binary ghc-8.2.2-binary
nixos.haskell.compiler.ghc844 ghc-8.4.4
nixos.haskell.compiler.ghc863Binary ghc-8.6.3-binary
nixos.haskell.compiler.ghc864 ghc-8.6.4
nixos.haskell.compiler.integer-simple.ghc864 ghc-8.6.4
nixos.haskell.compiler.ghc865 ghc-8.6.4.20190406
nixos.haskell.compiler.integer-simple.ghc865 ghc-8.6.4.20190406
nixos.haskell.compiler.ghcHEAD ghc-8.7.20190115
nixos.haskell.compiler.integer-simple.ghcHEAD ghc-8.7.20190115
nixos.haskell.compiler.ghcjs84 ghcjs-8.4.0.1
nixos.haskell.compiler.ghcjs ghcjs-8.6.0.1
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.