Skip to content

Cannot build HLS for ghc 9.0.1. error: attribute 'haskell-language-server' missing. #5

Open
@Zekt

Description

After running

nix-env --install --file . \
    --attr hls-renamed \
    --attr hls-wrapper-nix \
    --attr cabal-install \
    --attr stack \
    --attr implicit-hie \
    --attr direnv \
    --attr direnv-nix-lorelei \
    --attr ghc

I successfully installed the hls-wrapper-nix and HLS targeting ghc 8.10.4.

But when I want to install a HLS targeting ghc 9.0.1:

nix-env --install --file . \
    --argstr ghcVersion 9.0.1 \
    --arg hlsUnstable true \
	--attr hls-renamed

At first I would get following error messages:

installing 'haskell-language-server-ghc901-renamed'                                                                                    
trace: Checking materialization in /home/vik/repos/nix-haskell-hls/nix/materialized-linux/hls-unstable-ghc901                          
trace: WARNING: No sha256 found for source-repository-package https://github.com/hsyl20/ghc-api-compat 8fee87eac97a538dbe81ff1ab18cff10
f2f9fa15 download may fail in restricted mode (hydra)                                                                                  
trace: Consider adding `--sha256: 16bibb7f3s2sxdvdy2mq6w1nj1lc8zhms54lwmj17ijhvjys29vg` to the cabal.project file or passing in a looku
pSha256 argument                                                                                                                       
building '/nix/store/qpdhv0wgzrs4g1fak4g2vp8pnh50g568-hls-unstable-plan-to-nix-pkgs.drv'...                                            
Materialized nix used for hls-unstable-plan-to-nix-pkgs is missing. To fix run: /nix/store/dj1h0nhlryq4r6n1qjzxbfiwxqin2wy3-updateMater
ialized        
builder for '/nix/store/qpdhv0wgzrs4g1fak4g2vp8pnh50g568-hls-unstable-plan-to-nix-pkgs.drv' failed with exit code 1
error: build of '/nix/store/qpdhv0wgzrs4g1fak4g2vp8pnh50g568-hls-unstable-plan-to-nix-pkgs.drv' failed

After running updateMaterialized as it's suggested and trying to install HLS for ghc 9.0.1 again, I get other errors:

installing 'haskell-language-server-ghc901-renamed'                                                                                    
building '/nix/store/qm7qlaym8aq7mnmhmc93pmrib7nfz3nk-hls-unstable-plan-to-nix-pkgs.drv'...                                            
trace: ERROR: cabal configure failed with:                                                                                             
Cloning into '/build/tmp.rbJHewsvqT/dist-newstyle/src/p0kffic7q_-4762034bf50e7c46'...
HEAD is now at 47f95a6 Minimal Repo For Haskell.Nix            
Your branch is up to date with 'origin/minimal'.               
Warning: The package list for 'hackage.haskell.org-at-2021-08-08T000000Z' is
18867 days old.                                                                                                                        
Run 'cabal update' to get the latest list of available packages.                                                                       
Warning: Requested index-state 2021-08-08T00:00:00Z is newer than
'hackage.haskell.org-at-2021-08-08T000000Z'! Falling back to older state
(2021-08-07T22:27:45Z).                                                                                                                
Resolving dependencies...                                                                                                              
cabal: Could not resolve dependencies:
[__0] trying: ghc-api-compat-8.6.1 (user goal)                                                                                         
[__1] trying: ghc-9.0.1/installed-9.0.1 (dependency of ghc-api-compat)
[__2] trying: base-4.15.0.0/installed-4.15.0.0 (dependency of ghc-api-compat)
[__3] trying: ghcide-1.4.1.0 (user goal)
[__4] next goal: hie-bios (dependency of ghcide)                                                                                       
[__4] rejecting: hie-bios-0.7.5 (conflict: ghc==9.0.1/installed-9.0.1,                         
hie-bios => ghc>=8.4.1 && <8.11)
[__4] skipping: hie-bios-0.7.4, hie-bios-0.7.2, hie-bios-0.7.1,
hie-bios-0.7.0, hie-bios-0.6.3, hie-bios-0.6.2, hie-bios-0.6.1,
hie-bios-0.6.0, hie-bios-0.5.1, hie-bios-0.5.0, hie-bios-0.4.0,
hie-bios-0.3.2, hie-bios-0.3.1, hie-bios-0.3.0, hie-bios-0.2.1,
hie-bios-0.2.0, hie-bios-0.1.1, hie-bios-0.1.0, hie-bios-0.7.3 (has the same
characteristics that caused the previous version to fail: excludes 'ghc'
version 9.0.1)
[__4] fail (backjumping, conflict set: ghc, ghcide, hie-bios)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: ghc, ghcide, hie-bios, base,
ghc-api-compat
Try running with --minimize-conflict-set to improve the error message.

error: attribute 'haskell-language-server' missing, at /home/vik/repos/nix-haskell-hls/nix/default.nix:101:20

It seems that the newest hie-bios on hackage doesn't support ghc 9.0.1, could there be any workarounds to use hie-bios on master branch instead?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions