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

Can't print dependencies of bytestring #1

Closed
sjakobi opened this issue Dec 16, 2019 · 3 comments
Closed

Can't print dependencies of bytestring #1

sjakobi opened this issue Dec 16, 2019 · 3 comments

Comments

@sjakobi
Copy link

sjakobi commented Dec 16, 2019

I'd like to use this project to investigate the potential fallout of a change in bytestring (see haskell/bytestring#140).

As a first step I tried to get a list of its reverse dependencies, but failed:

$ nix-build default.nix --argstr reverseDepsOf bytestring --arg justPrintAllDeps true
error: value is null while a set was expected, at /home/simon/src/nix-reverse-deps-of-haskell-package/default.nix:127:44
(use '--show-trace' to show detailed location information)

The result is the same with e.g. text.

Am I hitting a fundamental limitation of this project or could this be fixed?

@cdepillabout
Copy link
Owner

Unfortunately I think this is a fundamental limitation.

bytestring and text are GHC boot packages, so they are actually set to null in nixpkgs:

https://github.com/NixOS/nixpkgs/blob/303c94493c36406159c033aa9100e4aac534e366/pkgs/development/haskell-modules/configuration-ghc-8.6.x.nix#L10-L42

That's why you're getting the value is null while a set was expected error message.

One way to work around this might be by adding your own bytestring package to the Haskell package set and overwriting the built-in nulled-out bytestring package. I'm not sure how easy this would be to do.

@sjakobi
Copy link
Author

sjakobi commented Dec 16, 2019

Thanks for the quick response!

I think I'll try to build a custom GHC using the modified bytestring version then.

@sjakobi sjakobi closed this as completed Dec 16, 2019
@cdepillabout
Copy link
Owner

cdepillabout commented Dec 16, 2019

@sjakobi Oh, I don't mean you have to use a modified GHC. I just mean that in an overlay to haskellPackages, you might be able to use your own bytestring version:

self: super: {
  bytestring = haskell.lib.callCabal2nix "bytestring" ../some/path/to/modified/bytestring-src/ {};
}

I'm not 100% sure this will be easy to get to work, although hopefully it will.


Of course, using a modified GHC will almost certainly work, it will just take a very long time to do the initial compile.

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

2 participants