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

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions pkgs/development/haskell-modules/configuration-ghc-9.0.x.nix
Original file line number Diff line number Diff line change
Expand Up @@ -182,4 +182,12 @@ self: super: {

# Needs OneTuple for ghc < 9.2
binary-orphans = addBuildDepends [ self.OneTuple ] super.binary-orphans;

# fix build with avx, see https://github.com/haskell-crypto/cryptonite/issues/347
# https://github.com/haskell-crypto/cryptonite/pull/373
cryptonite = appendPatch (pkgs.fetchpatch {
url = "https://github.com/haskell-crypto/cryptonite/commit/1da7efd7ffac8b8b3ea325da79cd73a2e4a39085.patch";
excludes = [ "cbits/decaf/tools/generate.sh" ];
sha256 = "sha256-fgu8D9z3lFfVNz5GJqsbWApG+T2PPZyXJ+AkFXArwH0=";
}) (doDistribute super.cryptonite);
}
8 changes: 8 additions & 0 deletions pkgs/development/haskell-modules/configuration-ghc-9.2.x.nix
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,14 @@ self: super: {
# weeder == 2.5.* requires GHC 9.4
weeder = doDistribute self.weeder_2_4_1;

# fix build with avx, see https://github.com/haskell-crypto/cryptonite/issues/347
# https://github.com/haskell-crypto/cryptonite/pull/373
cryptonite = appendPatch (pkgs.fetchpatch {
url = "https://github.com/haskell-crypto/cryptonite/commit/1da7efd7ffac8b8b3ea325da79cd73a2e4a39085.patch";
excludes = [ "cbits/decaf/tools/generate.sh" ];
sha256 = "sha256-fgu8D9z3lFfVNz5GJqsbWApG+T2PPZyXJ+AkFXArwH0=";
}) super.cryptonite;

# Jailbreaks & Version Updates
hashable-time = doJailbreak super.hashable-time;

Expand Down
8 changes: 8 additions & 0 deletions pkgs/development/haskell-modules/configuration-ghc-9.4.x.nix
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,14 @@ in {
# still the case when updating: https://gitlab.haskell.org/ghc/ghc/-/blob/0198841877f6f04269d6050892b98b5c3807ce4c/ghc.mk#L463
xhtml = if self.ghc.hasHaddock or true then null else self.xhtml_3000_2_2_1;

# fix build with avx, see https://github.com/haskell-crypto/cryptonite/issues/347
# https://github.com/haskell-crypto/cryptonite/pull/373
cryptonite = appendPatch (pkgs.fetchpatch {
url = "https://github.com/haskell-crypto/cryptonite/commit/1da7efd7ffac8b8b3ea325da79cd73a2e4a39085.patch";
excludes = [ "cbits/decaf/tools/generate.sh" ];
sha256 = "sha256-fgu8D9z3lFfVNz5GJqsbWApG+T2PPZyXJ+AkFXArwH0=";
}) super.cryptonite;

# Tests fail because of typechecking changes
conduit = dontCheck super.conduit;

Expand Down
8 changes: 8 additions & 0 deletions pkgs/development/haskell-modules/configuration-ghc-9.8.x.nix
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,12 @@ self: super: {
inline-c-cpp =
(if isDarwin then appendConfigureFlags ["--ghc-option=-fcompact-unwind"] else x: x)
super.inline-c-cpp;

# fix build with avx, see https://github.com/haskell-crypto/cryptonite/issues/347
# https://github.com/haskell-crypto/cryptonite/pull/373
cryptonite = appendPatch (pkgs.fetchpatch {
url = "https://github.com/haskell-crypto/cryptonite/commit/1da7efd7ffac8b8b3ea325da79cd73a2e4a39085.patch";
excludes = [ "cbits/decaf/tools/generate.sh" ];
sha256 = "sha256-fgu8D9z3lFfVNz5GJqsbWApG+T2PPZyXJ+AkFXArwH0=";
}) (doDistribute super.cryptonite);
}