NixOS / NixOS/cabal2nix

hackage2nix: Correctly flag broken Haskell packages

Open
#554 12 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug enhancement
Dominant language
Haskell
Stars
402
Forks
162
PR merge metrics
No merged PRs in 30d

Description

I added pkgs.haskell.packages.ghc901.haskell-language-server to the available packages in my Nix configuration, and get a build error (see below). Afterwards, I did some research and found that haskell-language-server is not yet available for GHC 9.0.1, so pkgs.haskell.packages.ghc901.haskell-language-server is correctly broken but not labeled as broken.

I am not familiar with the Haskell pipeline of Nixpkgs, but I wanted to ask if it is possible to label broken Haskell packages accordingly? In this case, it would have saved me, and I guess many others, a lot of time.

Please let me know, what you think.

The specific error message:

error: builder for '/nix/store/6wg48vjfrzhpb1k2b6aqvbwnbw2ifml4-ghc-api-compat-8.6.drv' failed with exit code 1;
       last 10 log lines:
       >       - The module 'GHC.Iface.Utils'
       >         is not exported by any suitable package.
       >         It occurs in neither the 'exposed-modules' of this package,
       >         nor any of its 'build-depends' dependencies.
       >       - The module 'GHC.Driver.Packages'
       >         is not exported by any suitable package.
       >         It occurs in neither the 'exposed-modules' of this package,
       >         nor any of its 'build-depends' dependencies.
       >     In the stanza library
       >
       For full logs, run 'nix log /nix/store/6wg48vjfrzhpb1k2b6aqvbwnbw2ifml4-ghc-api-compat-8.6.drv'.
error: 1 dependencies of derivation '/nix/store/5rfswq3vf8dyqkw441y5ywx7qb334zzn-haskell-language-server-1.2.0.0.drv' failed to build
error: 1 dependencies of derivation '/nix/store/8g67r8yzcl2azhz48y8vwmnrbb8arf0j-home-manager-path.drv' failed to build
error: 1 dependencies of derivation '/nix/store/ylys98ijpysjii2pxcw4kj28lz9dv845-home-manager-generation.drv' failed to build

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the hackage2nix handling for Haskell packages and the GHC 9.0.1 package set, using the reported haskell-language-server build failure as the reproduction case. Determine how unavailable packages are identified and marked broken, then verify that the package is labeled broken before its dependencies are built.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
build-system, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.