Skip to content

Can't create shell with cabal-fmt and GHC 9.10 #2205

@m4dc4p

Description

@m4dc4p

Describe the bug

When trying to create a shell with GHC 9.10.1 and cabal-fmt, the build fails with the following error:

error: The Haskell package set does not contain the package: os-string (build dependency).

This is using the latest haskell.nix.

Steps To Reproduce

This isn't a complete expression but hopefully enough to repro:

{ system ? builtins.currentSystem, compiler-nix-name ? "ghc910" }:
let 
  sources = import ./nix/sources.nix;
  haskell-nix = import sources."haskell.nix" {  };
  
  pkgs = import sources.nixpkgs (haskell-nix.nixpkgsArgs // { inherit system; });

  project = pkgs.haskell-nix.project' {
    inherit compiler-nix-name;
    src = ./.;

    shell = {
      tools = {
        cabal-fmt = {
          version = "latest";
          configureArgs = "--allow-newer=base";
        };
      };
    };
  };
    
in
  { 
    shell = project.shell;
  }

Running nix-shell -A shell will show the problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions