Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -829,8 +829,6 @@ supported-platforms:
midi-alsa: [ platforms.linux ] # alsa-core only supported on linux
midisurface: [ platforms.linux ] # alsa-core only supported on linux
OrderedBits: [ platforms.x86 ] # lacks implementations for non-x86: https://github.com/choener/OrderedBits/blob/401cbbe933b1635aa33e8e9b29a4a570b0a8f044/lib/Data/Bits/Ordered.hs#L316
password: [ platforms.x86 ] # uses scrypt, which requries x86
password-instances: [ platforms.x86 ] # uses scrypt, which requries x86
reactivity: [ platforms.windows ]
reflex-libtelnet: [ platforms.linux ] # pkgs.libtelnet only supports linux
scat: [ platforms.x86 ] # uses scrypt, which requries x86
Expand Down
29 changes: 29 additions & 0 deletions pkgs/development/haskell-modules/configuration-nix.nix
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,35 @@ self: super: builtins.intersectAttrs super {
'' + drv.preCheck or "";
}) super.agda2lagda;

# - Disable scrypt support since the library used only works on x86 due to SSE2:
# https://github.com/informatikr/scrypt/issues/8
# - Use crypton as the encryption backend. That override becomes obsolete with
# 3.1.* since cabal2nix picks crypton by default then.
password =
let
scryptSupported = pkgs.stdenv.hostPlatform.isx86;
in

lib.pipe
(super.password.override ({
cryptonite = self.crypton;
} // lib.optionalAttrs (!scryptSupported) {
scrypt = null;
}))
([
(enableCabalFlag "crypton")
(disableCabalFlag "cryptonite")
# https://github.com/cdepillabout/password/pull/84
(appendPatch ./patches/password-3.0.4.0-scrypt-conditional.patch)
(overrideCabal (drv: {
# patch doesn't apply otherwise because of revisions
prePatch = drv.prePatch or "" + ''
${pkgs.buildPackages.dos2unix}/bin/dos2unix *.cabal
'';
}))
] ++ lib.optionals (!scryptSupported) [
(disableCabalFlag "scrypt")
]);

audacity = enableCabalFlag "buildExamples" (overrideCabal (drv: {
executableHaskellDepends = [self.optparse-applicative self.soxlib];
Expand Down
3 changes: 0 additions & 3 deletions pkgs/development/haskell-modules/hackage-packages.nix

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
diff --git a/password/password.cabal b/password/password.cabal
index 506457e..8fa978b 100644
--- a/password.cabal
+++ b/password.cabal
@@ -186,6 +186,8 @@ test-suite password-tasty
other-modules:
Scrypt
Data.Password.Scrypt
+ build-depends:
+ scrypt
ghc-options:
-threaded -O2 -rtsopts -with-rtsopts=-N
build-depends:
@@ -195,7 +197,6 @@ test-suite password-tasty
, bytestring
, memory
, quickcheck-instances
- , scrypt
, tasty
, tasty-hunit
, tasty-quickcheck