summaryrefslogtreecommitdiff
path: root/.gitlab/shell.nix
diff options
context:
space:
mode:
authorMoritz Angermann <moritz.angermann@gmail.com>2021-02-13 11:41:47 +0800
committerMoritz Angermann <moritz.angermann@gmail.com>2021-05-07 09:17:22 +0800
commitc5454dc7467cf6f51d9ab27430271abee5628f6d (patch)
tree93f08ae87d50ec14bc19ec34fff689f578a7fa64 /.gitlab/shell.nix
parent30f6923a834ccaca30c3622a0a82421fabcab119 (diff)
downloadhaskell-c5454dc7467cf6f51d9ab27430271abee5628f6d.tar.gz
[ci] Add support for building on aarch64-darwin
This will fail for now. But allows us to add aarch64-darwin machines to CI. (cherry picked from commit a7d22795ed118abfe64f4fc55d96d8561007ce1e)
Diffstat (limited to '.gitlab/shell.nix')
-rw-r--r--.gitlab/shell.nix52
1 files changed, 52 insertions, 0 deletions
diff --git a/.gitlab/shell.nix b/.gitlab/shell.nix
new file mode 100644
index 0000000000..f5c691ffaa
--- /dev/null
+++ b/.gitlab/shell.nix
@@ -0,0 +1,52 @@
+{ 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;
+
+ # 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";
+
+ buildInputs = 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
+ ];
+}