diff options
author | Moritz Angermann <moritz.angermann@gmail.com> | 2021-02-13 11:41:47 +0800 |
---|---|---|
committer | Moritz Angermann <moritz.angermann@gmail.com> | 2021-03-21 21:04:42 -0400 |
commit | 0cbdba2768d84a0f6832ae5cf9ea1e98efd739da (patch) | |
tree | c233ed1c8673782cfabae7bf0437606c6ead46a7 /.gitlab/shell.nix | |
parent | adbaa9a9e3d952d21be74178e2e4405e0777d456 (diff) | |
download | haskell-0cbdba2768d84a0f6832ae5cf9ea1e98efd739da.tar.gz |
[ci/arm/darwin/testsuite] Forwards ports from GHC-8.10
This is a set of forward ports (cherry-picks) from 8.10
- a7d22795ed [ci] Add support for building on aarch64-darwin
- 5109e87e13 [testlib/driver] denoise
- 307d34945b [ci] default value for CONFIGURE_ARGS
- 10a18cb4e0 [testsuite] mark ghci056 as fragile
- 16c13d5acf [ci] Default value for MAKE_ARGS
- ab571457b9 [ci/build] Copy config.sub around
- 251892b98f [ci/darwin] bump nixpkgs rev
- 5a6c36ecb4 [testsuite/darwin] fix conc059
- aae95ef0c9 [ci] add timing info
- 3592d1104c [Aarch64] No div-by-zero; disable test.
- 57671071ad [Darwin] mark stdc++ tests as broken
- 33c4d49754 [testsuite] filter out superfluous dylib warnings
- 4bea83afec [ci/nix-shell] Add Foundation and Security
- 6345530062 [testsuite/json2] Fix failure with LLVM backends
- c3944bc89d [ci/nix-shell] [Darwin] Stop the ld warnings about libiconv.
- b821fcc714 [testsuite] static001 is not broken anymore.
- f7062e1b0c [testsuite/arm64] fix section_alignment
- 820b076698 [darwin] stop the DYLD_LIBRARY_PATH madness
- 07b1af0362 [ci/nix-shell] uniquify NIX_LDFLAGS{_FOR_TARGET}
As well as a few additional fixups needed to make this block compile:
- Fixup all.T
- Set CROSS_TARGET, BROKEN_TESTS, XZ, RUNTEST_ARGS, default value.
- [ci] shell.nix bump happy
Diffstat (limited to '.gitlab/shell.nix')
-rw-r--r-- | .gitlab/shell.nix | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/.gitlab/shell.nix b/.gitlab/shell.nix new file mode 100644 index 0000000000..5e32847735 --- /dev/null +++ b/.gitlab/shell.nix @@ -0,0 +1,65 @@ +{ system ? "aarch64-darwin" +#, nixpkgs ? fetchTarball https://github.com/angerman/nixpkgs/archive/257cb120334.tar.gz #apple-silicon.tar.gz +, pkgs ? import <nixpkgs> { inherit system; } +, compiler ? if system == "aarch64-darwin" then "ghc8103Binary" else "ghc8103" +}: pkgs.mkShell { + # this prevents nix from trying to write the env-vars file. + # we can't really, as NIX_BUILD_TOP/env-vars is not set. + noDumpEnvVars=1; + + # stop polluting LDFLAGS with -liconv + dontAddExtraLibs = true; + + # we need to inject ncurses into --with-curses-libraries. + # the real fix is to teach terminfo to use libcurses on macOS. + CONFIGURE_ARGS = "--with-intree-gmp --with-curses-libraries=${pkgs.ncurses.out}/lib"; + + # magic speedup pony :facepalm: + # + # nix has the ugly habbit of duplicating ld flags more than necessary. This + # somewhat consolidates this. + shellHook = '' + export NIX_LDFLAGS=$(for a in $NIX_LDFLAGS; do echo $a; done |sort|uniq|xargs) + export NIX_LDFLAGS_FOR_TARGET=$(for a in $NIX_LDFLAGS_FOR_TARGET; do echo $a; done |sort|uniq|xargs) + export NIX_LDFLAGS_FOR_TARGET=$(comm -3 <(for l in $NIX_LDFLAGS_FOR_TARGET; do echo $l; done) <(for l in $NIX_LDFLAGS; do echo $l; done)) + ''; + + nativeBuildInputs = (with pkgs; [ + haskell.compiler.${compiler} + haskell.packages.${compiler}.cabal-install + haskell.packages.${compiler}.alex + haskell.packages.${compiler}.happy # _1_19_12 is needed for older GHCs. + + clang_11 + llvm_11 + + automake + autoconf + m4 + + gmp + ncurses + libiconv + zlib.out + zlib.dev + glibcLocales + # locale doesn't build yet :-/ + # locale + + git + + python3 + # python3Full + # python3Packages.sphinx + perl + + which + wget + file + + xz + xlibs.lndir + + cacert ]) + ++ (with pkgs.darwin.apple_sdk.frameworks; [ Foundation Security ]); +} |