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

haskellPackages.ncurses: mark as broken #148629

Merged

Conversation

trofi
Copy link
Contributor

@trofi trofi commented Dec 4, 2021

Without the change the build fails as:

dist/build/UI/NCurses/Enums.chs.h:140: (column 25) [ERROR]  >>> Unknown identifier!
  Cannot find a definition for `KEY_EVENT' in the header file.

Comment on lines 2089 to 2090
# Fixes build failure on ncurses-6.3
ncurses = appendPatch ./patches/KEY_EVENT-ncurses-6.3.patch super.ncurses;
Copy link
Member

Choose a reason for hiding this comment

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

Is there somewhere you can pull this patch from upstream or something? Normally we try to avoid carrying patches in Nixpkgs if possible.

Also, should this be reported upstream? If so, please report upstream and add a link in the comment here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think there is a public repository or bug tracker for hackage:ncurses. Emailed John (former hackage:ncurses maintainer) and Tom (current hackage:ncurses maintainer) to see if we have any place to report it upstream.

Copy link
Member

Choose a reason for hiding this comment

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

Hmm, that's unfortunate.

Are you using this Haskell ncurses package somewhere? If so, it seems like forking it and taking it over on Hackage might be a better idea than carrying around a patch here in Nixpkgs:

Since it doesn't seem to have any users, would anyone really benefit from only fixing it here in Nixpkgs? If there is someone who would benefit, wouldn't it be better to take it over on Hackage so that it could benefit the whole Hackage community?

Copy link
Member

Choose a reason for hiding this comment

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

Oh, maybe you're not a Haskeller, but you were just fixing this because of the fallout from https://discourse.nixos.org/t/uncoming-ncurses-6-2-6-3-update/16169? In my opinion, you can just ignore haskellPackages.ncurses for now, since it seems dead.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I personally don't use hackage:ncurses and would prefer not to take over upstream maintenance. Tom (current hackage:ncurses maintainer) said he will try to upload fixed version on hackage soon (maybe within weeks).

I'd also prefer not to introduce known regressions into nixpkgs to save peoples' time on investigation. Would meta.broken = true be a sensible use for known-broken packages?

Copy link
Member

Choose a reason for hiding this comment

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

Tom (current hackage:ncurses maintainer) said he will try to upload fixed version on hackage soon (maybe within weeks)

Oh, nice. How did you know that Haskell ncurses had a new owner? Looking at https://hackage.haskell.org/package/ncurses, I can't find anywhere that mentions a new owner.

Would meta.broken = true be a sensible use for known-broken packages?

Yeah, that seems reasonable to me. You could add ncurses to the package list in pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml and then re-run maintainers/scripts/haskell/regenerate-hackage-packages.sh. Ideally after rebasing this on the haskell-updates branch.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, nice. How did you know that Haskell ncurses had a new owner? Looking at https://hackage.haskell.org/package/ncurses, I can't find anywhere that mentions a new owner.

I asked John in private email (by sending a patch :) and he redirected me to Tom. Tom would like to cut a new release soon.

Yeah, that seems reasonable to me. You could add ncurses to the package list in pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml and then re-run maintainers/scripts/haskell/regenerate-hackage-packages.sh. Ideally after rebasing this on the haskell-updates branch.

Aha, sounds reasonable. I'll fall back to it after a few days.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Let's declare it a timeout. Marked haskellPackages.ncurses and it's two revdeps as broken.

, hsncurses_KEY_RESIZE = KEY_RESIZE
+#ifdef KEY_EVENT
+/* removed in ncurses-6.3 */
, hsncurses_KEY_EVENT = KEY_EVENT
Copy link
Member

Choose a reason for hiding this comment

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

Seems like we got lucky and KEY_EVENT isn't actually used anywhere.

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/uncoming-ncurses-6-2-6-3-update/16169/2

haskellPackages.ncurses will fail to build against `ncurses-6.3`:

    dist/build/UI/NCurses/Enums.chs.h:140: (column 25) [ERROR]  >>> Unknown identifier!
      Cannot find a definition for `KEY_EVENT' in the header file.

The package did not see an update since 2016. Let's mark it
and it's two revdeps `nyan` and `scroll` as broken.
@trofi trofi force-pushed the fix-haskell-ncurses-for-ncurses-6.3 branch from 8602fa6 to c6404e1 Compare December 31, 2021 18:50
@trofi trofi changed the title haskellPackages.ncurses: fix pending upstream inclusion for ncurses-6.3 haskellPackages.ncurses: mark as broken Dec 31, 2021
@cdepillabout cdepillabout merged commit 78bc086 into NixOS:master Jan 1, 2022
@cdepillabout
Copy link
Member

Thanks for working through this!

@trofi trofi deleted the fix-haskell-ncurses-for-ncurses-6.3 branch January 1, 2022 09:44
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

4 participants