-
-
Notifications
You must be signed in to change notification settings - Fork 15.3k
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
haskellPackages.bustle: fix building on Hydra #78559
Conversation
Updates to haskell packages should go to the |
Should not it be okay to merge this to master and then possibly merge |
# https://gitlab.freedesktop.org/bustle/bustle/issues/13 | ||
(bustle: bustle.override { hgettext = null; }) | ||
(bustle: disableCabalFlag bustle "hgettext") | ||
(bustle: bustle.overrideAttrs (attrs: { meta = builtins.removeAttrs attrs.meta [ "hydraPlatforms" ]; })) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(edit: The following is incorrect. See my next message.)
I don't know anything about bustle
, but my guess is that hydraPlatforms
being set to none
is a bug in hackage2nix
.
hydraPlatforms
is set to none
automatically by hackage2nix
/cabal2nix
when the package is marked broken. However, the hydraPlatforms
setting should be removed automatically when the package is marked unbroken.
In this case, it appears that the package was marked unbroken, but the hydraPlatforms
setting was not removed.
I feel like I've seen something like this happen before, but I don't remember the underlying cause.
Maybe @peti has an idea what could be going on here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I figured out what is going on here.
bustle
has a license set as OtherLicense
:
However, bustle's actual license is some combination of LGPL and GPL:
https://gitlab.freedesktop.org/bustle/bustle/blob/27ac836202028d1a9e4f18fff21d10aff802b04b/LICENSE
hackage2nix
sets hydraPlatforms
to none
by default for OtherLicense
:
So I think the correct solution here is to send a PR to cabal2nix
overriding the hdyraPlatforms
setting for bustle
.
Here's the function this needs to be added to:
@jtojnar Could you send this PR? If you don't know Haskell, I can try to put together a PR for this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, looks like it no longer depends on dbus-core so upstream can switch to LGPL.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will be fixed in https://gitlab.freedesktop.org/bustle/bustle/merge_requests/17, I think the temporary fix is fine here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this case, it appears that the package was marked unbroken, but the
hydraPlatforms
setting was not removed.
The license might be a problem, indeed. Another problem is the system dependency on gio-unix
which hackage2nix
cannot resolve because we have no package of that name. We should probably add an appropriate name mapping to https://github.com/NixOS/cabal2nix/blob/master/src/Distribution/Nixpkgs/Haskell/FromCabal/Name.hs to remedy that issue. I can do that, but someone would have to tell me what that name should be mapped to, because I don't know.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gio-unix-2.0
is part of glib
package.
The way the Haskell stuff works in nixpkgs is that updates to the files in Once a week, @peti cleans up the branch, makes sure nothing too major has stopped working, and merges Cleaning up the So while it would be possible to merge this into |
Bustle is proclaiming OtherLicense even though the code is licensed under LGPL 2.1+. This causes cabal2nix to set hydraPlatforms = stdenv.lib.platforms.none in hackage-packages.nix for the package. Lets let's unset the attribute and fix the license.
Good use of |
For some reasons, perhaps inherited from hgettext, bustle had
hydraPlatforms = stdenv.lib.platforms.none
set inhackage-packages.nix
.It builds fine with our overrides so let's unset the attribute.