git.iko.soy/typeable/nixpkgs
on master help sign in
nim: 0.18.0 -> 0.19.0

- remove sqlite as dependency (I don't see why it's needed) - run checkPhase after installPhase (at least one test assumes the standard library in ../lib relative to the nim binary) - the broken tests pass now or don't exist anymore - two of the tests requiring network access pass now without network access - the tests in manyloc do not download dependencies and are passing now

commit9bf79add1380b436d8cf7bb885095cd1a7bcfca0 authorroyneary <christian@ulrich.earth> dateSat 27 Oct 2018, 14:30 (8 years ago) parent6e621a0
1 file changed+12−20
pkgs/development/compilers/nim/default.nix+12−20
pkgs/development/compilers/nim/default.nix+12−20
@@ -1,14 +1,14 @@
11# based on https://github.com/nim-lang/Nim/blob/v0.18.0/.travis.yml
22
3−{ stdenv, lib, fetchurl, makeWrapper, nodejs-slim-8_x, openssl, pcre, readline, sqlite, boehmgc, sfml, tzdata, coreutils }:
3+{ stdenv, lib, fetchurl, makeWrapper, nodejs-slim-8_x, openssl, pcre, readline, boehmgc, sfml, tzdata, coreutils }:
44
55stdenv.mkDerivation rec {
66 name = "nim-${version}";
7− version = "0.18.0";
7+ version = "0.19.0";
88
99 src = fetchurl {
1010 url = "https://nim-lang.org/download/${name}.tar.xz";
11− sha256 = "45c74adb35f08dfa9add1112ae17330e5d902ebb4a36e7046caee8b79e6f3bd0";
11+ sha256 = "0biwvw1gividp5lkf0daq1wp9v6ms4xy6dkf5zj0sn9w4m3n76d1";
1212 };
1313
1414 doCheck = !stdenv.isDarwin;
@@ -19,7 +19,6 @@ stdenv.mkDerivation rec {
1919 "-lcrypto"
2020 "-lpcre"
2121 "-lreadline"
22− "-lsqlite3"
2322 "-lgc"
2423 ];
2524
@@ -30,10 +29,16 @@ stdenv.mkDerivation rec {
3029
3130 buildInputs = [
3231 makeWrapper nodejs-slim-8_x tzdata coreutils
33− openssl pcre readline sqlite boehmgc sfml
32+ openssl pcre readline boehmgc sfml
3433 ];
3534
35+ phases = [ "unpackPhase" "patchPhase" "buildPhase" "installPhase" "checkPhase" ];
36+
3637 buildPhase = ''
38+ # use gcc to trigger the linker since calling ld in build.sh causes an error
39+ LD=gcc
40+ # build.sh wants to write to $HOME/.cache
41+ HOME=$TMPDIR
3742 sh build.sh
3843 ./bin/nim c koch
3944 ./koch boot -d:release \
@@ -51,7 +56,7 @@ stdenv.mkDerivation rec {
5156 --suffix PATH : ${lib.makeBinPath [ stdenv.cc ]}
5257 '';
5358
54− postPatch =
59+ patchPhase =
5560 let disableTest = ''sed -i '1i discard \"\"\"\n disabled: true\n\"\"\"\n\n' '';
5661 disableCompile = ''sed -i -e 's/^/#/' '';
5762 in ''
@@ -59,25 +64,12 @@ stdenv.mkDerivation rec {
5964 substituteInPlace ./tests/osproc/tworkingdir.nim --replace "/usr/bin" "${coreutils}/bin"
6065 substituteInPlace ./tests/stdlib/ttimes.nim --replace "/usr/share/zoneinfo" "${tzdata}/share/zoneinfo"
6166
62− # disable supposedly broken tests
63− ${disableTest} ./tests/errmsgs/tproper_stacktrace2.nim
64− ${disableTest} ./tests/vm/trgba.nim
65−
6667 # disable tests requiring network access (not available in the build container)
6768 ${disableTest} ./tests/stdlib/thttpclient.nim
68− ${disableTest} ./tests/cpp/tasync_cpp.nim
69− ${disableTest} ./tests/niminaction/Chapter7/Tweeter/src/tweeter.nim
70−
71− # disable tests requiring un-downloadable dependencies (using nimble, which isn't available in the fetch phase)
72− ${disableCompile} ./tests/manyloc/keineschweine/keineschweine.nim
73− ${disableTest} ./tests/manyloc/keineschweine/keineschweine.nim
74− ${disableCompile} ./tests/manyloc/nake/nakefile.nim
75− ${disableTest} ./tests/manyloc/nake/nakefile.nim
76− ${disableCompile} ./tests/manyloc/named_argument_bug/main.nim
77− ${disableTest} ./tests/manyloc/named_argument_bug/main.nim
7869 '';
7970
8071 checkPhase = ''
72+ PATH=$PATH:$out/bin
8173 ./koch tests
8274 '';
8375