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.cryptonite: fix compilation with avx #204239

Conversation

SuperSandro2000
Copy link
Member

Description of changes
Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 23.05 Release Notes (or backporting 22.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

@cdepillabout
Copy link
Member

I think cryptonite is already building on the haskell-updates branch. Is it building right now without avx, is that why this patch is needed? Do you have a personal overlay where you enable avx for all of nixpkgs?

@SuperSandro2000
Copy link
Member Author

Is it building right now without avx, is that why this patch is needed? Do you have a personal overlay where you enable avx for all of nixpkgs?

yes and yes. I am setting nixpkgs.config.gcc.arch to skyflake and in all haskell packages I am using this was the only build failure.

@cdepillabout
Copy link
Member

I'd like to wait until the cryptonite maintainer replies to haskell-crypto/cryptonite#373 before merging this in.

It is not clear to me the ramifications of this change (or why it was changed originally).

@SuperSandro2000
Copy link
Member Author

@trofi already commented on the idea of the fix a while ago haskell-crypto/cryptonite#347 (comment)

@cdepillabout
Copy link
Member

As far as I can tell, trofi isn't a maintainer of cryptonite?

@SuperSandro2000
Copy link
Member Author

SuperSandro2000 commented Dec 7, 2022

No, but the quoted commit message confirms the fix and the maintainers are usually a bit slow to respond and I don't really want to wait potentially multiple weeks.

@cdepillabout
Copy link
Member

cdepillabout commented Dec 7, 2022

I don't feel comfortable merging a change to a widely-used crypto library in Haskell without at least the upstream maintainer commenting on it (especially for a use-case that most users won't be affected by).

Although cryptonite is somewhat known for having slow reviews of PRs, so I can understand your frustration...

@nixos-discourse
Copy link

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

https://discourse.nixos.org/t/best-practice-to-automaticly-build-all-installed-packages-to-put-them-into-a-binary-cache/25527/14

@sternenseemann sternenseemann marked this pull request as draft February 20, 2023 00:53
@SuperSandro2000
Copy link
Member Author

@cdepillabout so nothing really happened in two months and there are more and more people that need this patch. What do we do?

@SuperSandro2000 SuperSandro2000 force-pushed the haskellPackages-cryptonite branch from cd4b80a to fb2ae66 Compare February 21, 2023 20:11
@SuperSandro2000 SuperSandro2000 marked this pull request as ready for review February 21, 2023 20:11
@sternenseemann
Copy link
Member

sternenseemann commented Feb 21, 2023

@cdepillabout so nothing really happened in two months and there are more and more people that need this patch. What do we do?

A lot of upstream projects don't include a patch for something downstream users “need” – our patching should be within reason.

Edit: To clarify, I still don't think it is reasonable for us to merge this revert of an upstream change without comment from upstream. Additionally, it is fair to say that the “need” for this change is exclusive to a handful of people that recompile the entirety of nixpkgs with added compiler flags. Having an overlay for that purpose is probably tolerable.

@SuperSandro2000
Copy link
Member Author

What are we doing now that the repository is archived for a crypto those security relevant package?

@someplaceguy
Copy link
Contributor

What are we doing now that the repository is archived for a crypto those security relevant package?

It probably makes sense to replace cryptonite with crypton, which is a fork that appears to be maintained:

https://old.reddit.com/r/haskell/comments/14245q8/crypton_is_forked_from_cryptonite_with_the/jn36k6s/

Although crypton probably still has the same issue as cryptonite, so I guess a new issue should be filed.

@sternenseemann
Copy link
Member

Hackage has the ability to deal with an unmaintained package. We'll just have to see what happens.

@wegank wegank added 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md 2.status: merge conflict This PR has merge conflicts with the target branch labels Mar 19, 2024
@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Mar 20, 2024
@wegank wegank added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jul 4, 2024
@SuperSandro2000 SuperSandro2000 deleted the haskellPackages-cryptonite branch October 17, 2024 23:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.status: merge conflict This PR has merge conflicts with the target branch 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md 6.topic: haskell 10.rebuild-darwin: 501-1000 10.rebuild-darwin: 501+ 10.rebuild-linux: 501+ 10.rebuild-linux: 1001-2500
Development

Successfully merging this pull request may close these issues.

6 participants