Skip to content

Regression: shells no longer contain system-cxx-std-lib even if necessary #2381

Closed
@amesgen

Description

@amesgen

Since #2375, development shells (with exactDeps = false, the default) no longer contain system-cxx-std-lib, which means that pre-installed packages like double-conversion that depend on system-cxx-std-lib are broken and are not used by Cabal.

Concretely, running ghc-pkg check in a dev shell prints

The following packages are broken, either because they have a problem
listed above, or because they depend on a broken package.
double-conversion-2.0.5.0

Minimal reproducible example

https://github.com/amesgen/stuff/tree/haskell.nix-shell-system-cxx-std-lib

da5e52c6 Include all pre-existing ghc pkgs in shell, unless exactDeps (#2375)
794d2e76 Update Hackage and Stackage

Running this command uses 794d2e7 (just before #2375) works fine (apart from printing some harmless warnings):

 $ nix develop github:amesgen/stuff/haskell.nix-shell-system-cxx-std-lib#good -c ghc-pkg check

Also:

 $ nix develop github:amesgen/stuff/haskell.nix-shell-system-cxx-std-lib#good -c ghc-pkg list | grep system-cxx-std-lib
    system-cxx-std-lib-1.0

OTOH, this command uses da5e52c (#2375) and prints the error message:

 $ nix develop github:amesgen/stuff/haskell.nix-shell-system-cxx-std-lib#bad -c ghc-pkg check
The following packages are broken, either because they have a problem
listed above, or because they depend on a broken package.
double-conversion-2.0.5.0

Also:

 $ nix develop github:amesgen/stuff/haskell.nix-shell-system-cxx-std-lib#bad -c ghc-pkg list | grep system-cxx-std-lib
WARNING: there are broken packages.  Run 'ghc-pkg-9.6.7 check' for more details.

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