about summary refs log tree commit diff
path: root/pkgs/development/compilers
diff options
context:
space:
mode:
authorEmery Hemingway <ehmry@posteo.net>2019-11-02 15:09:50 +0100
committerEmery Hemingway <ehmry@posteo.net>2019-11-02 15:12:40 +0100
commit523b9f792f755902103e99994310eeb6b286c58c (patch)
tree8066638005752c598ea020c803a64fb3930b3f2b /pkgs/development/compilers
parente37aa876429647ef1b42a5394313aee007c378c5 (diff)
downloadnixlib-523b9f792f755902103e99994310eeb6b286c58c.tar
nixlib-523b9f792f755902103e99994310eeb6b286c58c.tar.gz
nixlib-523b9f792f755902103e99994310eeb6b286c58c.tar.bz2
nixlib-523b9f792f755902103e99994310eeb6b286c58c.tar.lz
nixlib-523b9f792f755902103e99994310eeb6b286c58c.tar.xz
nixlib-523b9f792f755902103e99994310eeb6b286c58c.tar.zst
nixlib-523b9f792f755902103e99994310eeb6b286c58c.zip
nim: disable Nim compiler check
Too many tests need to be disabled and too many additional inputs
are required.
Diffstat (limited to 'pkgs/development/compilers')
-rw-r--r--pkgs/development/compilers/nim/default.nix57
1 files changed, 5 insertions, 52 deletions
diff --git a/pkgs/development/compilers/nim/default.nix b/pkgs/development/compilers/nim/default.nix
index 2215c5f7b1f3..48808bf356b9 100644
--- a/pkgs/development/compilers/nim/default.nix
+++ b/pkgs/development/compilers/nim/default.nix
@@ -1,7 +1,7 @@
 # based on https://github.com/nim-lang/Nim/blob/v0.18.0/.travis.yml
 
-{ stdenv, lib, fetchurl, makeWrapper, nodejs-slim, openssl, pcre, readline,
-  boehmgc, sfml, tzdata, coreutils, sqlite }:
+{ stdenv, lib, fetchurl, makeWrapper, openssl, pcre, readline,
+  boehmgc, sfml, sqlite }:
 
 stdenv.mkDerivation rec {
   pname = "nim";
@@ -12,8 +12,6 @@ stdenv.mkDerivation rec {
     sha256 = "1rjinrs119c8i6wzz5fzjfml7n7kbd5hb9642g4rr8qxkq4sx83k";
   };
 
-  doCheck = !stdenv.isDarwin;
-
   enableParallelBuilding = true;
 
   NIX_LDFLAGS = [
@@ -24,14 +22,9 @@ stdenv.mkDerivation rec {
     "-lsqlite3"
   ];
 
-  # 1. nodejs is only needed for tests
-  # 2. we could create a separate derivation for the "written in c" version of nim
-  #    used for bootstrapping, but koch insists on moving the nim compiler around
-  #    as part of building it, so it cannot be read-only
-
-  checkInputs = [
-    nodejs-slim tzdata coreutils
-  ];
+  # we could create a separate derivation for the "written in c" version of nim
+  # used for bootstrapping, but koch insists on moving the nim compiler around
+  # as part of building it, so it cannot be read-only
 
   nativeBuildInputs = [
     makeWrapper
@@ -56,46 +49,6 @@ stdenv.mkDerivation rec {
     runHook postBuild
   '';
 
-  prePatch =
-    let disableTest = ''sed -i '1i discard \"\"\"\n  disabled: true\n\"\"\"\n\n' '';
-        disableStdLibTest = ''sed -i -e '/^when isMainModule/,/^END$/{s/^/#/}' '';
-        disableCompile = ''sed -i -e 's/^/#/' '';
-    in ''
-      substituteInPlace ./tests/osproc/tworkingdir.nim --replace "/usr/bin" "${coreutils}/bin"
-      substituteInPlace ./tests/stdlib/ttimes.nim --replace "/usr/share/zoneinfo" "${tzdata}/share/zoneinfo"
-
-      # runs out of memory on a machine with 8GB RAM
-      ${disableTest} ./tests/system/t7894.nim
-
-      # requires network access (not available in the build container)
-      ${disableTest} ./tests/stdlib/thttpclient.nim
-    '' + lib.optionalString stdenv.isAarch64 ''
-      # supposedly broken on aarch64
-      ${disableStdLibTest} ./lib/pure/stats.nim
-
-      # reported upstream: https://github.com/nim-lang/Nim/issues/11463
-      ${disableCompile} ./lib/nimhcr.nim
-      ${disableTest} ./tests/dll/nimhcr_unit.nim
-      ${disableTest} ./tests/dll/nimhcr_integration.nim
-
-      # reported upstream: https://github.com/nim-lang/Nim/issues/12262
-      ${disableTest} ./tests/range/tcompiletime_range_checks.nim
-
-      # requires "immintrin.h" which is available only on x86
-      ${disableTest} ./tests/misc/tsizeof3.nim
-    '';
-
-  checkPhase = ''
-    runHook preCheck
-
-    # Fortify hardening breaks tests
-    # https://github.com/nim-lang/Nim/issues/11435#issuecomment-534545696
-    NIX_HARDENING_ENABLE=''${NIX_HARDENING_ENABLE/fortify/} \
-    ./koch tests --nim:bin/nim all
-
-    runHook postCheck
-  '';
-
   installPhase = ''
     runHook preInstall