Skip to content

ghcjs.ghcWithPackages fails with "error: value is a path while a set was expected" for certain packages #158600

@rzetterberg

Description

@rzetterberg

Describe the bug

When I run:

nix-shell -p 'pkgs.haskell.packages.ghcjs.ghcWithPackages (p: with p; [ reflex ])'

I get the following error:

error: value is a path while a set was expected

       at /nix/store/ivngb8kkjz9iy5ys433yf29xxn039ysl-nixos-21.11.335665.0f316e4d72d/nixos/pkgs/development/haskell-modules/lib/compose.nix:38:28:

           37|    */
           38|   overrideCabal = f: drv: (drv.override (args: args // {
             |                            ^
           39|     mkDerivation = drv: (args.mkDerivation drv).override f;
(use '--show-trace' to show detailed location information)

This problem does not happen if I run:

nix-shell -p 'pkgs.haskell.packages.ghcjs.ghcWithPackages (p: with p; [ base ])'

then the compilation starts, like expected. Same thing if I provide an empty list of packages.

Notify maintainers

Maintainers from haskell team: @cdepillabout, @expipiplus1, @maralorn, @sternenseemann

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 5.10.93, NixOS, 21.11 (Porcupine)`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.5.0pre20211206_d1aaa7e`
 - channels(zed): `""`
 - channels(root): `"nixos-21.11.335665.0f316e4d72d"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

Metadata

Metadata

Assignees

No one assigned

    Labels

    0.kind: bugSomething is broken6.topic: haskellGeneral-purpose, statically typed, purely functional programming language

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions