void-packages/srcpkgs/stack/patches/ppc.patch

31 lines
1.3 KiB
Diff

--- src/Stack/Setup.hs
+++ src/Stack/Setup.hs
@@ -95,5 +95,6 @@ import System.IO.Error (isPermissionError)
import System.FilePath (searchPathSeparator)
import qualified System.FilePath as FP
import System.Permissions (setFileExecutable)
+import System.Endian (getSystemEndianness, Endianness (..))
import System.Uname (getRelease)
import Data.List.Split (splitOn)
@@ -1264,4 +1265,9 @@ getOSKey platform =
Platform X86_64 Cabal.Windows -> return "windows64"
Platform Arm Cabal.Linux -> return "linux-armv7"
Platform AArch64 Cabal.Linux -> return "linux-aarch64"
+ Platform PPC Cabal.Linux -> return "linux-powerpc"
+ Platform PPC64 Cabal.Linux ->
+ case getSystemEndianness of
+ LittleEndian -> return "linux-powerpc64le"
+ BigEndian -> return "linux-powerpc64"
Platform arch os -> throwM $ UnsupportedSetupCombo os arch
downloadFromInfo
--- stack.cabal
+++ stack.cabal
@@ -235,6 +235,7 @@ library
, conduit
, conduit-extra
, containers
+ , cpu >=0.1.2
, cryptonite
, cryptonite-conduit
, deepseq