Skip to content

Bogus output for gio, pango, and many other gtk related packages #136

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

Open
peti opened this issue Jan 20, 2015 · 0 comments
Open

Bogus output for gio, pango, and many other gtk related packages #136

peti opened this issue Jan 20, 2015 · 0 comments
Labels

Comments

@peti
Copy link
Member

peti commented Jan 20, 2015

The Cabal file for gio specifies a pkgconfig dependency on gio. However, that name gets re-written to glib because gio is part of glib in Nixpkgs. So we end up in a situation where there generated expression has a dependency on both the Haskell package glib in buildDepends and the system package glib in pkgconfigDepends. Since both have the same name, we cannot pass both! haskell2nix decides that the glib reference to the Haskell package set will be found automatically by callPackage and does nothing for that. For the pkgconfig reference, it generates an override to set glib = pkgs.glib. The net result is that the Haskell package reference will not be included and the build fails as reported in NixOS/nixpkgs#5863.

@peti peti added the bug label Jan 20, 2015
@peti peti changed the title Bogus output for "gio" Bogus output for gio, pango, and many other gtk related packages Jan 22, 2015
peti added a commit that referenced this issue Jan 22, 2015
The post-process hook filters any package from pkgconfigDepends that is
also part of buildDepends. In other words, if some package depends on
the Haskell library "glib", then we filter "glib" from pkgconfigDepends.
As a result, the bogus resolver in "hackage2nix" won't fire.

Of course, this means that the system library is now missing from those
builds that had their pkgconfigDepends stripped. We counter this by
adding the appropriate system package to the propagatedBuildInputs field
of the their corresponding Haskell library. For example, the Haskell
package "glib" exports the system library "glib" to all its users -- so
these users don't have to depend on it anymore.

The real solution is to fix the resolver, of course, but this change
will hopefully fix a number of builds *right now* without much of an
effort to do the right thing(tm).
peti added a commit to NixOS/nixpkgs that referenced this issue Jan 22, 2015
This commit also implements the second part of the
NixOS/cabal2nix@4f603d1
hack to work around NixOS/cabal2nix#136

Fixes #5902.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant