Skip to content

Commit 32e5b80

Browse files
committed
Merge branch 'master' of github.com:input-output-hk/haskell.nix into circuithub
2 parents 98468dd + 20856de commit 32e5b80

File tree

15 files changed

+60
-28
lines changed

15 files changed

+60
-28
lines changed

flake.lock

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

modules/cabal-project.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ in {
2525
ghc99FullName = pkgs.haskell-nix.resolve-compiler-name "ghc99";
2626
in
2727
# cabal-install from hackage (3.10.1.0) does not build with GHC HEAD
28-
if fullName == ghc99FullName && config.name == "cabal-install" && config.version == "3.10.1.0"
28+
if fullName == ghc99FullName && config.name == "cabal-install" && (builtins.elem config.version ["3.10.1.0" "3.10.2.0" "3.10.2.1"])
2929
then "ghc963"
3030
else pkgs.haskell-nix.resolve-compiler-name name;
3131
};

overlays/armv6l-linux.nix

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ final: prev:
66
let
77
withTH = import ./linux-cross.nix {
88
inherit (pkgs.stdenv) hostPlatform buildPlatform;
9-
inherit (pkgs) stdenv lib writeScriptBin;
9+
inherit (pkgs) stdenv lib;
10+
inherit (pkgs.pkgsBuildBuild) writeShellScriptBin symlinkJoin;
1011
inherit (pkgs.haskell-nix) haskellLib;
1112
# qemu for linux
1213
# Using `buildPackages.buildPackages` here fixes `python3Packages.pygobject3` issue.

overlays/linux-cross.nix

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,42 @@
11
{ stdenv
22
, lib
33
, haskellLib
4-
, writeScriptBin
4+
, writeShellScriptBin
55
, qemu
66
, qemuSuffix ? (haskellLib.qemuByHostPlatform hostPlatform)
77
, iserv-proxy
88
, iserv-proxy-interpreter
99
, gmp
1010
, buildPlatform
1111
, hostPlatform
12+
, symlinkJoin
1213
, ...
1314
}:
1415
let
1516

1617
# we want this to hold only for arm (32 and 64bit) for now.
1718
isLinuxCross = haskellLib.isCrossHost && hostPlatform.isLinux && (hostPlatform.isAarch32 || hostPlatform.isAarch64);
18-
qemuIservWrapper = writeScriptBin "iserv-wrapper" ''
19-
#!${stdenv.shell}
19+
qemuIservWrapperScript = enableProfiling:
20+
let
21+
interpreter =
22+
if enableProfiling
23+
then iserv-proxy-interpreter.override { inherit enableProfiling; }
24+
else iserv-proxy-interpreter;
25+
in
26+
writeShellScriptBin ("iserv-wrapper" + lib.optionalString enableProfiling "-prof") ''
2027
set -euo pipefail
2128
# Unset configure flags as configure should have run already
2229
unset configureFlags
2330
PORT=$((5000 + $RANDOM % 5000))
24-
(>&2 echo "---> Starting ${iserv-proxy-interpreter.exeName} on port $PORT")
25-
${qemu}/bin/qemu-${qemuSuffix} ${iserv-proxy-interpreter.override (lib.optionalAttrs hostPlatform.isAndroid { setupBuildFlags = ["--ghc-option=-optl-static" ];})}/bin/${iserv-proxy-interpreter.exeName} tmp $PORT &
26-
(>&2 echo "---| ${iserv-proxy-interpreter.exeName} should have started on $PORT")
31+
(>&2 echo "---> Starting ${interpreter.exeName} on port $PORT")
32+
${qemu}/bin/qemu-${qemuSuffix} ${interpreter.override (lib.optionalAttrs hostPlatform.isAndroid { setupBuildFlags = ["--ghc-option=-optl-static" ];})}/bin/${interpreter.exeName} tmp $PORT &
33+
(>&2 echo "---| ${interpreter.exeName} should have started on $PORT")
2734
RISERV_PID="$!"
2835
${iserv-proxy}/bin/iserv-proxy $@ 127.0.0.1 "$PORT"
29-
(>&2 echo "---> killing ${iserv-proxy-interpreter.exeName}...")
36+
(>&2 echo "---> killing ${interpreter.exeName}...")
3037
kill $RISERV_PID
3138
'';
39+
qemuIservWrapper = symlinkJoin { name = "iserv-wrapper"; paths = [ (qemuIservWrapperScript false) (qemuIservWrapperScript true) ]; };
3240
configureFlags = lib.optional hostPlatform.isAarch32 "--disable-split-sections";
3341
setupBuildFlags = map (opt: "--ghc-option=" + opt) ((lib.optionals isLinuxCross
3442
[ "-fexternal-interpreter"
@@ -39,8 +47,7 @@ let
3947
++ lib.optionals hostPlatform.isAarch32 (map (opt: "--gcc-option=" + opt) [ "-fno-pic" "-fno-plt" ])
4048
# Also for GHC #15275
4149
++ lib.optionals hostPlatform.isAarch64 ["--gcc-option=-fPIC"];
42-
qemuTestWrapper = writeScriptBin "test-wrapper" ''
43-
#!${stdenv.shell}
50+
qemuTestWrapper = writeShellScriptBin "test-wrapper" ''
4451
set -euo pipefail
4552
${qemu}/bin/qemu-${qemuSuffix} $@*
4653
'';

test/cabal-simple-prof/default.nix

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@ let
1818
project = cabalProject' {
1919
inherit compiler-nix-name evalPackages;
2020
src = testSrc "cabal-simple-prof";
21-
cabalProjectLocal = builtins.readFile ../cabal.project.local;
21+
cabalProjectLocal = builtins.readFile ../cabal.project.local
22+
+ lib.optionalString (haskellLib.isCrossHost && stdenv.hostPlatform.isAarch64) ''
23+
constraints: text -simdutf, text source
24+
'';
2225
inherit modules;
2326
};
2427

test/cabal-simple/default.nix

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ let
1515
project = project' {
1616
inherit compiler-nix-name evalPackages;
1717
src = testSrc "cabal-simple";
18-
cabalProjectLocal = builtins.readFile ../cabal.project.local;
18+
cabalProjectLocal = builtins.readFile ../cabal.project.local
19+
+ lib.optionalString (haskellLib.isCrossHost && stdenv.hostPlatform.isAarch64) ''
20+
constraints: text -simdutf, text source
21+
'';
1922
inherit modules;
2023
};
2124

test/cabal-source-repo-comments/default.nix

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@ let
66
project = cabalProject' {
77
inherit compiler-nix-name evalPackages;
88
src = testSrc "cabal-source-repo-comments";
9-
cabalProjectLocal = builtins.readFile ../cabal.project.local;
9+
cabalProjectLocal = builtins.readFile ../cabal.project.local
10+
+ lib.optionalString (haskellLib.isCrossHost && stdenv.hostPlatform.isAarch64) ''
11+
constraints: text -simdutf, text source
12+
'';
1013
};
1114
packages = project.hsPkgs;
1215
in recurseIntoAttrs {

test/cabal-source-repo/default.nix

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@ let
66
project = cabalProject' {
77
inherit compiler-nix-name evalPackages;
88
src = testSrc "cabal-source-repo";
9-
cabalProjectLocal = builtins.readFile ../cabal.project.local;
9+
cabalProjectLocal = builtins.readFile ../cabal.project.local
10+
+ lib.optionalString (haskellLib.isCrossHost && stdenv.hostPlatform.isAarch64) ''
11+
constraints: text -simdutf, text source
12+
'';
1013
};
1114
packages = project.hsPkgs;
1215
in recurseIntoAttrs {

test/cabal-sublib/default.nix

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@ let
1616
project = cabalProject' {
1717
inherit compiler-nix-name evalPackages;
1818
src = testSrc "cabal-sublib";
19-
cabalProjectLocal = builtins.readFile ../cabal.project.local;
19+
cabalProjectLocal = builtins.readFile ../cabal.project.local
20+
+ lib.optionalString (haskellLib.isCrossHost && stdenv.hostPlatform.isAarch64) ''
21+
constraints: text -simdutf, text source
22+
'';
2023
inherit modules;
2124
};
2225

test/call-cabal-project-to-nix/default.nix

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@ let
99
inherit compiler-nix-name evalPackages;
1010
# reuse the cabal-simple test project
1111
src = testSrc "cabal-simple";
12-
cabalProjectLocal = builtins.readFile ../cabal.project.local;
12+
cabalProjectLocal = builtins.readFile ../cabal.project.local
13+
+ lib.optionalString (haskellLib.isCrossHost && stdenv.hostPlatform.isAarch64) ''
14+
constraints: text -simdutf, text source
15+
'';
1316
};
1417
pkgSet = mkCabalProjectPkgSet {
1518
plan-pkgs = importAndFilterProject {

0 commit comments

Comments
 (0)