about summary refs log tree commit diff
path: root/pkgs/development/compilers
diff options
context:
space:
mode:
authorFrederik Rietdijk <fridh@fridh.nl>2020-08-29 13:30:25 +0200
committerFrederik Rietdijk <fridh@fridh.nl>2020-08-29 13:30:25 +0200
commit7b56d26ae39af07a769ba580afe69be995af50e0 (patch)
treee2b8bb49f91639156c6972769edd4755b86eb878 /pkgs/development/compilers
parentefb45f7638ca900575a5ee8da8de77f9ca87ae42 (diff)
parent80dfc6dc3cc5991ca82668f20028b1f823f43ea7 (diff)
Merge master into staging-next
Diffstat (limited to 'pkgs/development/compilers')
-rw-r--r--pkgs/development/compilers/flutter/default.nix1
-rw-r--r--pkgs/development/compilers/ghc/8.10.1.nix11
-rw-r--r--pkgs/development/compilers/ghc/8.6.5.nix11
-rw-r--r--pkgs/development/compilers/ghc/8.8.2.nix11
-rw-r--r--pkgs/development/compilers/ghc/8.8.3.nix11
-rw-r--r--pkgs/development/compilers/ghc/8.8.4.nix11
-rw-r--r--pkgs/development/compilers/ghc/head.nix8
-rw-r--r--pkgs/development/compilers/ghcjs-ng/8.6/dep-overrides.nix7
-rw-r--r--pkgs/development/compilers/ghcjs-ng/default.nix3
-rw-r--r--pkgs/development/compilers/kcc/default.nix25
10 files changed, 81 insertions, 18 deletions
diff --git a/pkgs/development/compilers/flutter/default.nix b/pkgs/development/compilers/flutter/default.nix
index c58457b71a413..9b9d1f7481d14 100644
--- a/pkgs/development/compilers/flutter/default.nix
+++ b/pkgs/development/compilers/flutter/default.nix
@@ -6,6 +6,7 @@ let
     let files = builtins.attrNames (builtins.readDir dir);
     in map (f: dir + ("/" + f)) files;
 in {
+  mkFlutter = mkFlutter;
   stable = mkFlutter rec {
     pname = "flutter";
     channel = "stable";
diff --git a/pkgs/development/compilers/ghc/8.10.1.nix b/pkgs/development/compilers/ghc/8.10.1.nix
index 761681a1d4f83..d3835d01e5a23 100644
--- a/pkgs/development/compilers/ghc/8.10.1.nix
+++ b/pkgs/development/compilers/ghc/8.10.1.nix
@@ -62,8 +62,15 @@ let
     endif
     DYNAMIC_GHC_PROGRAMS = ${if enableShared then "YES" else "NO"}
     INTEGER_LIBRARY = ${if enableIntegerSimple then "integer-simple" else "integer-gmp"}
-  '' + stdenv.lib.optionalString (targetPlatform != hostPlatform) ''
-    Stage1Only = ${if targetPlatform.system == hostPlatform.system then "NO" else "YES"}
+  ''
+    # We only need to build stage1 on most cross-compilation because
+    # we will be running the compiler on the native system. In some
+    # situations, like native Musl compilation, we need the compiler
+    # to actually link to our new Libc. The iOS simulator is a special
+    # exception because we can’t actually run simulators binaries
+    # ourselves.
+  + stdenv.lib.optionalString (targetPlatform != hostPlatform) ''
+    Stage1Only = ${if (targetPlatform.system == hostPlatform.system && !targetPlatform.isiOS) then "NO" else "YES"}
     CrossCompilePrefix = ${targetPrefix}
     HADDOCK_DOCS = NO
     BUILD_SPHINX_HTML = NO
diff --git a/pkgs/development/compilers/ghc/8.6.5.nix b/pkgs/development/compilers/ghc/8.6.5.nix
index 06266556cf331..a5d2bb5c88d62 100644
--- a/pkgs/development/compilers/ghc/8.6.5.nix
+++ b/pkgs/development/compilers/ghc/8.6.5.nix
@@ -59,8 +59,15 @@ let
     endif
     DYNAMIC_GHC_PROGRAMS = ${if enableShared then "YES" else "NO"}
     INTEGER_LIBRARY = ${if enableIntegerSimple then "integer-simple" else "integer-gmp"}
-  '' + stdenv.lib.optionalString (targetPlatform != hostPlatform) ''
-    Stage1Only = ${if targetPlatform.system == hostPlatform.system then "NO" else "YES"}
+  ''
+    # We only need to build stage1 on most cross-compilation because
+    # we will be running the compiler on the native system. In some
+    # situations, like native Musl compilation, we need the compiler
+    # to actually link to our new Libc. The iOS simulator is a special
+    # exception because we can’t actually run simulators binaries
+    # ourselves.
+  + stdenv.lib.optionalString (targetPlatform != hostPlatform) ''
+    Stage1Only = ${if (targetPlatform.system == hostPlatform.system && !targetPlatform.isiOS) then "NO" else "YES"}
     CrossCompilePrefix = ${targetPrefix}
     HADDOCK_DOCS = NO
     BUILD_SPHINX_HTML = NO
diff --git a/pkgs/development/compilers/ghc/8.8.2.nix b/pkgs/development/compilers/ghc/8.8.2.nix
index 35440a826077f..371a369496eef 100644
--- a/pkgs/development/compilers/ghc/8.8.2.nix
+++ b/pkgs/development/compilers/ghc/8.8.2.nix
@@ -59,8 +59,15 @@ let
     endif
     DYNAMIC_GHC_PROGRAMS = ${if enableShared then "YES" else "NO"}
     INTEGER_LIBRARY = ${if enableIntegerSimple then "integer-simple" else "integer-gmp"}
-  '' + stdenv.lib.optionalString (targetPlatform != hostPlatform) ''
-    Stage1Only = ${if targetPlatform.system == hostPlatform.system then "NO" else "YES"}
+  ''
+    # We only need to build stage1 on most cross-compilation because
+    # we will be running the compiler on the native system. In some
+    # situations, like native Musl compilation, we need the compiler
+    # to actually link to our new Libc. The iOS simulator is a special
+    # exception because we can’t actually run simulators binaries
+    # ourselves.
+  + stdenv.lib.optionalString (targetPlatform != hostPlatform) ''
+    Stage1Only = ${if (targetPlatform.system == hostPlatform.system && !targetPlatform.isiOS) then "NO" else "YES"}
     CrossCompilePrefix = ${targetPrefix}
     HADDOCK_DOCS = NO
     BUILD_SPHINX_HTML = NO
diff --git a/pkgs/development/compilers/ghc/8.8.3.nix b/pkgs/development/compilers/ghc/8.8.3.nix
index 821ac70a76dd9..e26eacca204bd 100644
--- a/pkgs/development/compilers/ghc/8.8.3.nix
+++ b/pkgs/development/compilers/ghc/8.8.3.nix
@@ -62,8 +62,15 @@ let
     endif
     DYNAMIC_GHC_PROGRAMS = ${if enableShared then "YES" else "NO"}
     INTEGER_LIBRARY = ${if enableIntegerSimple then "integer-simple" else "integer-gmp"}
-  '' + stdenv.lib.optionalString (targetPlatform != hostPlatform) ''
-    Stage1Only = ${if targetPlatform.system == hostPlatform.system then "NO" else "YES"}
+  ''
+    # We only need to build stage1 on most cross-compilation because
+    # we will be running the compiler on the native system. In some
+    # situations, like native Musl compilation, we need the compiler
+    # to actually link to our new Libc. The iOS simulator is a special
+    # exception because we can’t actually run simulators binaries
+    # ourselves.
+  + stdenv.lib.optionalString (targetPlatform != hostPlatform) ''
+    Stage1Only = ${if (targetPlatform.system == hostPlatform.system && !targetPlatform.isiOS) then "NO" else "YES"}
     CrossCompilePrefix = ${targetPrefix}
     HADDOCK_DOCS = NO
     BUILD_SPHINX_HTML = NO
diff --git a/pkgs/development/compilers/ghc/8.8.4.nix b/pkgs/development/compilers/ghc/8.8.4.nix
index 975a3ce1e2f9b..22a9e6e25f9ff 100644
--- a/pkgs/development/compilers/ghc/8.8.4.nix
+++ b/pkgs/development/compilers/ghc/8.8.4.nix
@@ -62,8 +62,15 @@ let
     endif
     DYNAMIC_GHC_PROGRAMS = ${if enableShared then "YES" else "NO"}
     INTEGER_LIBRARY = ${if enableIntegerSimple then "integer-simple" else "integer-gmp"}
-  '' + stdenv.lib.optionalString (targetPlatform != hostPlatform) ''
-    Stage1Only = ${if targetPlatform.system == hostPlatform.system then "NO" else "YES"}
+  ''
+    # We only need to build stage1 on most cross-compilation because
+    # we will be running the compiler on the native system. In some
+    # situations, like native Musl compilation, we need the compiler
+    # to actually link to our new Libc. The iOS simulator is a special
+    # exception because we can’t actually run simulators binaries
+    # ourselves.
+  + stdenv.lib.optionalString (targetPlatform != hostPlatform) ''
+    Stage1Only = ${if (targetPlatform.system == hostPlatform.system && !targetPlatform.isiOS) then "NO" else "YES"}
     CrossCompilePrefix = ${targetPrefix}
     HADDOCK_DOCS = NO
     BUILD_SPHINX_HTML = NO
diff --git a/pkgs/development/compilers/ghc/head.nix b/pkgs/development/compilers/ghc/head.nix
index e87d11a4682db..6f9f577743f5e 100644
--- a/pkgs/development/compilers/ghc/head.nix
+++ b/pkgs/development/compilers/ghc/head.nix
@@ -38,7 +38,7 @@
 , # Whether to build terminfo.
   enableTerminfo ? !stdenv.targetPlatform.isWindows
 
-, version ? "8.11.20200731"
+, version ? "8.11.20200824"
 , # What flavour to build. An empty string indicates no
   # specific flavour and falls back to ghc default values.
   ghcFlavour ? stdenv.lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform)
@@ -69,7 +69,7 @@ let
     DYNAMIC_GHC_PROGRAMS = ${if enableShared then "YES" else "NO"}
     BIGNUM_BACKEND = ${if enableNativeBignum then "native" else "gmp"}
   '' + stdenv.lib.optionalString (targetPlatform != hostPlatform) ''
-    Stage1Only = ${if targetPlatform.system == hostPlatform.system then "NO" else "YES"}
+    Stage1Only = ${if (targetPlatform.system == hostPlatform.system && !targetPlatform.isiOS) then "NO" else "YES"}
     CrossCompilePrefix = ${targetPrefix}
     HADDOCK_DOCS = NO
     BUILD_SPHINX_HTML = NO
@@ -110,8 +110,8 @@ stdenv.mkDerivation (rec {
 
   src = fetchgit {
     url = "https://gitlab.haskell.org/ghc/ghc.git/";
-    rev = "380638a33691ba43fdcd2e18bca636750e5f66f1";
-    sha256 = "029cgiyhddvwnx5zx31i0vgj13zsvzb8fna99zr6ifscz6x7rid1";
+    rev = "3f50154591ada9064351ccec4adfe6df53ca2439";
+    sha256 = "1w2p5bc74aswspzvgvrhcb95hvj5ky38rgqqjvrri19z2qyiky6d";
   };
 
   enableParallelBuilding = true;
diff --git a/pkgs/development/compilers/ghcjs-ng/8.6/dep-overrides.nix b/pkgs/development/compilers/ghcjs-ng/8.6/dep-overrides.nix
index c54c782fafa67..bbf8a579919f7 100644
--- a/pkgs/development/compilers/ghcjs-ng/8.6/dep-overrides.nix
+++ b/pkgs/development/compilers/ghcjs-ng/8.6/dep-overrides.nix
@@ -1,11 +1,14 @@
 { haskellLib }:
 
-let inherit (haskellLib) doJailbreak dontHaddock;
+let inherit (haskellLib) doJailbreak dontHaddock dontCheck;
 in self: super: {
+  ghcjs = super.ghcjs.override {
+    shelly = super.shelly_1_8_1;
+  };
   ghc-api-ghcjs = super.ghc-api-ghcjs.override
   {
     happy = self.happy_1_19_5;
   };
-  haddock-library-ghcjs = doJailbreak super.haddock-library-ghcjs;
+  haddock-library-ghcjs = doJailbreak (dontCheck super.haddock-library-ghcjs);
   haddock-api-ghcjs = doJailbreak (dontHaddock super.haddock-api-ghcjs);
 }
diff --git a/pkgs/development/compilers/ghcjs-ng/default.nix b/pkgs/development/compilers/ghcjs-ng/default.nix
index 6d56c410aabdf..7b6fbc460a95d 100644
--- a/pkgs/development/compilers/ghcjs-ng/default.nix
+++ b/pkgs/development/compilers/ghcjs-ng/default.nix
@@ -102,7 +102,6 @@ in stdenv.mkDerivation {
 
     inherit passthru;
 
-    meta.broken = true; # build does not succeed
-    meta.platforms = lib.platforms.none;  # passthru.bootPkgs.ghc.meta.platforms;
+    meta.platforms = passthru.bootPkgs.ghc.meta.platforms;
     meta.maintainers = [lib.maintainers.elvishjerricco];
   }
diff --git a/pkgs/development/compilers/kcc/default.nix b/pkgs/development/compilers/kcc/default.nix
new file mode 100644
index 0000000000000..49851dd0c074a
--- /dev/null
+++ b/pkgs/development/compilers/kcc/default.nix
@@ -0,0 +1,25 @@
+{ stdenv, fetchFromGitHub, cmake, bison, flex, boost }:
+
+stdenv.mkDerivation rec {
+  pname = "kcc";
+
+  version = "4.0.0";
+
+  src = fetchFromGitHub {
+    owner = "KnightOS";
+    repo = "kcc";
+    rev = version;
+    sha256 = "1cd226nqbxq32mppkljavq1kb74jqfqns9r7fskszr42hbygynk4";
+  };
+
+  nativeBuildInputs = [ cmake bison flex ];
+
+  buildInputs = [ boost ];
+
+  meta = with stdenv.lib; {
+    homepage    = "https://knightos.org/";
+    description = "KnightOS C compiler";
+    license     = licenses.gpl2Plus;
+    maintainers = with maintainers; [ siraben ];
+  };
+}