-
Notifications
You must be signed in to change notification settings - Fork 164
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into nixpkgs-21.05
- Loading branch information
Showing
5 changed files
with
52 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
self: _: { | ||
|
||
all-cabal-hashes = self.fetchurl { | ||
url = https://github.com/commercialhaskell/all-cabal-hashes/archive/5ea2bb9f4468a4043ed2d878fb6b8a3e70c7436f.tar.gz; | ||
sha256 = "1pg9vfsdk18ga38vjwl848pxfs81xsgg9rjgd5yvrychczhwr452"; | ||
url = https://github.com/commercialhaskell/all-cabal-hashes/archive/02611fecba726dceab2ba02079ae0e6ed86efa4d.tar.gz; | ||
sha256 = "1n0rizsylq4l3m81n7x339cc75p6vzg0jnz7qq4y8a3fkjqcfwb9"; | ||
}; | ||
|
||
} |
24 changes: 24 additions & 0 deletions
24
nixpkgs-overlays/mobile-ghc/8.6.y/android-patches/strict-align.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
diff --git a/libraries/bytestring/Data/ByteString/Builder/Prim/Internal.hs b/libraries/bytestring/Data/ByteString/Builder/Prim/Internal.hs | ||
index fb52404..572b4b7 100644 | ||
--- a/libraries/bytestring/Data/ByteString/Builder/Prim/Internal.hs | ||
+++ b/libraries/bytestring/Data/ByteString/Builder/Prim/Internal.hs | ||
@@ -198,7 +198,19 @@ liftFixedToBounded = toB | ||
|
||
{-# INLINE CONLIKE storableToF #-} | ||
storableToF :: forall a. Storable a => FixedPrim a | ||
+-- Not all architectures are forgiving of unaligned accesses; whitelist ones | ||
+-- which are known not to trap (either to the kernel for emulation, or crash). | ||
+#if defined(i386_HOST_ARCH) || defined(x86_64_HOST_ARCH) \ | ||
+ || ((defined(arm_HOST_ARCH) || defined(aarch64_HOST_ARCH)) \ | ||
+ && defined(__ARM_FEATURE_UNALIGNED)) \ | ||
+ || defined(powerpc_HOST_ARCH) || defined(powerpc64_HOST_ARCH) \ | ||
+ || defined(powerpc64le_HOST_ARCH) | ||
storableToF = FP (sizeOf (undefined :: a)) (\x op -> poke (castPtr op) x) | ||
+#else | ||
+storableToF = FP (sizeOf (undefined :: a)) $ \x op -> | ||
+ if ptrToWordPtr op `mod` fromIntegral (alignment (undefined :: a)) == 0 then poke (castPtr op) x | ||
+ else with x $ \tp -> copyBytes op (castPtr tp) (sizeOf (undefined :: a)) | ||
+#endif | ||
|
||
{- | ||
{-# INLINE CONLIKE liftIOF #-} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,25 @@ | ||
{ lib }: | ||
self: super: { | ||
let | ||
versionWildcard = versionList: let | ||
versionListInc = lib.init versionList ++ [ (lib.last versionList + 1) ]; | ||
bottom = lib.concatStringsSep "." (map toString versionList); | ||
top = lib.concatStringsSep "." (map toString versionListInc); | ||
in version: lib.versionOlder version top && lib.versionAtLeast version bottom; | ||
in self: super: { | ||
haskell = super.haskell // { | ||
compiler = super.haskell.compiler // lib.mapAttrs (n: v: v.overrideAttrs (drv: { | ||
patches = (drv.patches or []) ++ lib.optionals self.stdenv.targetPlatform.useAndroidPrebuilt [ | ||
./8.6.y/android-patches/force-relocation.patch | ||
]; | ||
patches = let | ||
isAndroid = self.stdenv.targetPlatform.useAndroidPrebuilt; | ||
isGhc86x = versionWildcard [ 8 6 ] v.version; | ||
in | ||
(drv.patches or []) ++ | ||
lib.optionals isAndroid [ | ||
./8.6.y/android-patches/force-relocation.patch | ||
] ++ | ||
lib.optionals (isAndroid && isGhc86x) [ | ||
./8.6.y/android-patches/strict-align.patch | ||
]; | ||
})) { inherit (super.haskell.compiler) ghc8107 ghcSplices-8_10; }; | ||
}; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,7 +35,7 @@ elif [ -e "$REPO/github.json" ] ; then | |
JSON_FILE="$REPO/github.json" | ||
GITHUB_OWNER="$(eval "echo $(nix-instantiate $NIXOPTS --eval -E "(builtins.fromJSON (builtins.readFile $REPO/github.json)).owner")")" | ||
GITHUB_REPO="$(eval "echo $(nix-instantiate $NIXOPTS --eval -E "(builtins.fromJSON (builtins.readFile $REPO/github.json)).repo")")" | ||
URL="git://github.com/$GITHUB_OWNER/$GITHUB_REPO" | ||
URL="https://github.com/$GITHUB_OWNER/$GITHUB_REPO" | ||
REV="$(eval "echo $(nix-instantiate $NIXOPTS --eval -E "(builtins.fromJSON (builtins.readFile $REPO/github.json)).rev")")" | ||
fi | ||
|
||
|
@@ -48,8 +48,12 @@ if [ -f "$REPO/thunk.nix" ] ; then | |
rm "$REPO/thunk.nix" | ||
fi | ||
rm "$JSON_FILE" | ||
|
||
trap "echo 'Attempted to replace $REPO but encountered unexpected file(s). Please remove.'" ERR | ||
rmdir "$REPO" | ||
|
||
trap "echo 'Could not clone $REPO. This thunk may be in a bad state.'" ERR | ||
|
||
git clone -n "$URL" "$REPO" | ||
REMOTE_URL="$(git -C "$REPO" config --get remote.origin.url)" | ||
FIXED_REMOTE_URL="$(echo "$REMOTE_URL" | sed 's_^git://github.com/[email protected]:_')" | ||
|