Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ghcWithPackages fails for ghcjs-ng #42032

Closed
cocreature opened this issue Jun 14, 2018 · 5 comments
Closed

ghcWithPackages fails for ghcjs-ng #42032

cocreature opened this issue Jun 14, 2018 · 5 comments
Assignees

Comments

@cocreature
Copy link
Contributor

Issue description

Trying to enter a nix-shell using ghcWithPackages fails for the ghcjs-ng derivations (8.2 and 8.4) with errors like the following:

building '/nix/store/05qi9d7am25xpwgy8mk304npmqad18a0-ghcjs-8.4.0.1-with-packages.drv'...
There are problems in package dlist-0.8.0.4:
  dependency "base-4.11.1.0-5Kf3GqzZBK3J87Uu7pRIno" doesn't exist
  dependency "deepseq-1.4.3.0-42XnsAVec7XA2IheMXu1r7" doesn't exist

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

In this case I tried haskell.packages.ghcjs84.ghcWithPackages(pkgs: [pkgs.dlist]) but the issue seems to appear for all packages I tried (but it doesn’t happen if the list of packages is empty).

Steps to reproduce

Run the following command

nix-build -E 'with import (builtins.fetchTarball { url = "https://github.com/NixOS/nixpkgs/archive/3e3a9e661d7ef83f9dfc26d948a12f8ee1334f6d.tar.gz"; sha256 = "07rhxdig4l0xlpwdg4z0vsz4k3gvkd32bzi13mymv4mn9hbqwb4w"; }) {}; haskell.packages.ghcjs84.ghcWithPackages (pkgs: [pkgs.dlist])'

Technical details

  • system: "x86_64-linux"
  • host os: Linux 4.16.13-2-ARCH, Arch Linux, noversion
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.0.2
  • channels(root): "nixpkgs-18.09pre140156.0e6fb50954b"
  • channels(moritz): ""
  • nixpkgs: /home/moritz/code/nixpkgs
@matthewbauer
Copy link
Member

/cc @Ericson2314

@stepcut
Copy link
Contributor

stepcut commented Jun 18, 2018

I believe this is happening because packages like deepseq and base are being installed in /libexec and dlist is being installed in /lib and the ghcWithPackages is only configuring things to look in one of those locations.

In my ignorant opinion I think the issue is that the core packages are also supposed to be in /lib not /libexec

@matthewbauer
Copy link
Member

Can you confirm that #42191 fixes this for you?

@cocreature
Copy link
Contributor Author

I can confirm that this fixes the error but ghcWithPackages still doesn’t behave correctly:

If I run nix-shell -p 'with import <nixpkgs> {}; haskell.packages.ghcjs84.ghcWithPackages (pkgs: [pkgs.dlist])' --command "ghcjs-pkg list" I don’t see dlist and if I try to compile a file that imports Data.DList in that shell using ghcjs I get an error about missing modules.

@Ericson2314 Ericson2314 reopened this Jun 19, 2018
@stepcut
Copy link
Contributor

stepcut commented Jun 19, 2018

I believe the reason you see that is that this patch gets ghcjs to see the base and deepseq libraries that are in /libexec but now ghcjs does not see the dlist library that is in /lib.

I can not explain why some libraries are in /libexec and others are in /lib. Under ghc and older ghcjs I believe all the libraries were in one single location.

matthewbauer added a commit to obsidiansystems/nixpkgs that referenced this issue Jun 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants