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

cut-the-crap: Depend on c2hs #96681

Closed
wants to merge 1 commit into from

Conversation

jappeace
Copy link
Contributor

Motivation for this change

This makes the 1.4.x builds less broken: It evaluates and starts building now at least.
The header file is still missing, which is fixed in the 1.4.1 release.

To debug further I need the hackage be regenerated.

The root cause of this breakage is the added dependency of pocketsphinx.
cabal2nix seems to be able to figure that part out,
but not something like c2hs (arguably this is a bug in cabal2nix),
I suppose few people link directly to C.
I just didn't know header
files wouldn't be included in the sdist. (I thought specifying an
include dir was enough).

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
    I can't quite test untill hackage gets regenerated. I just want to make it build at least.
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

This makes the 1.4.x builds less broken.
I made a 1.4.1 release that also includes the header
files now.

To debug further I need the hackage be regenerated.

The root cause of this breakage is the added dependency of pocketsphinx.
cabal2nix seems to be able to figure that part out,
but not something like c2hs, and I just didn't know header
files wouldn't be included in the sdist. (I though specifying an
include dir was enough).
@@ -722,6 +722,7 @@ self: super: builtins.intersectAttrs super {
cut-the-crap =
let path = pkgs.stdenv.lib.makeBinPath [ pkgs.ffmpeg_3 ];
in overrideCabal (addBuildTool super.cut-the-crap pkgs.makeWrapper) (_drv: {
libraryToolDepends = [ self.c2hs ];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is c2hs not in the .cabal file upstream? If not, could you fix it by sending a PR upstream?

Also, if I remember correctly, I think the maintainer of cut-the-crap is active here in nixpkgs. You might want to directly ping them for any reviews/questions.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah I realize now I can just add it to the cabal, thanks for that, that's a much neater solution. It's fixed in 1.4.2, should build again on next update of haskell packages.

@jappeace jappeace closed this Aug 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants