stack build error: attribute ‘ghc822’ missing, at (string):1:53

后端 未结 5 1188
后悔当初
后悔当初 2021-02-14 11:53

I am attempting to build my haskell project on NixOS.

Running $ stack build gives the following error.

$ stack build
error: attribute ‘ghc82         


        
5条回答
  •  逝去的感伤
    2021-02-14 12:27

    It seems like your stack wants to retrieve the haskell.packages.ghc822 attribute or perhaps haskell.compiler.ghc822, which is not present in your version of .

    Please check your channel configuration using sudo nix-channel --list (NixOS) or nix-channel --list. Releases 17.03 and older do not have this attribute. 17.09 and unstable should be fine. To switch your default to 17.09, note the name of the channel and run

    nix-channel --add https://nixos.org/channels/nixos-17.09 
    

    Also run nix-channel --update to make sure you have a recent version. GHC 8.2.2 was added on Oct 31st.

    If you don't want to change your channel configuration, I suppose you can set the NIX_PATH environment variable

    NIX_PATH=nixpkgs=https://github.com/NixOS/nixpkgs-channels/archive/nixos-unstable.tar.gz stack build
    

提交回复
热议问题