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

33 lines
1.3 KiB
Diff

--- a/src/Stack/Setup.hs
+++ b/src/Stack/Setup.hs
@@ -91,6 +91,7 @@
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)
@@ -1241,6 +1242,11 @@
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 Sparc Cabal.Linux -> return "linux-sparc"
Platform arch os -> throwM $ UnsupportedSetupCombo os arch
--- a/stack.cabal
+++ b/stack.cabal
@@ -246,6 +246,7 @@
conduit >=1.3.4.1,
conduit-extra >=1.3.5,
containers >=0.6.2.1,
+ cpu >=0.1.2,
cryptonite >=0.27,
cryptonite-conduit >=0.2.2,
deepseq >=1.4.4.0,