Skip to content

How to deal with missing ghc version on Nix? #166

@wizzup

Description

@wizzup

Try to convert 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions