git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #49250 from royneary/nim-0.19

nim: 0.18.0 -> 0.19.0

commit5de50f8fa37147ec5905301d9dd576479441a736 authorGabriel Ebner <gebner@gebner.org> dateFri 2 Nov 2018, 10:20 (8 years ago) parent467a82218aa80f
3 files changed+30−25
pkgs/applications/science/biology/mosdepth/default.nix+6−3 pkgs/development/compilers/nim/default.nix+20−21 pkgs/development/tools/nrpl/default.nix+4−1
pkgs/applications/science/biology/mosdepth/default.nix+6−3
@@ -4,8 +4,8 @@ let
44 hts-nim = fetchFromGitHub {
55 owner = "brentp";
66 repo = "hts-nim";
7− rev = "9cd83e30522ab64cd71eb8209be4154aa5579ce1";
8− sha256 = "10g408idy14667varq1syf06rrbpk63i3ib7i5dh1md4ib19av6f";
7+ rev = "v0.2.5";
8+ sha256 = "1fma99rjqxgg9dihkd10hm1jjp5amsk5wsxnvq1lk4mcsjix5xqb";
99 };
1010
1111 docopt = fetchFromGitHub {
@@ -28,7 +28,10 @@ in stdenv.mkDerivation rec {
2828
2929 buildInputs = [ nim ];
3030
31− buildPhase = "nim -p:${hts-nim}/src -p:${docopt}/src c -d:release mosdepth.nim";
31+ buildPhase = ''
32+ HOME=$TMPDIR
33+ nim -p:${hts-nim}/src -p:${docopt}/src c --nilseqs:on -d:release mosdepth.nim
34+ '';
3235 installPhase = "install -Dt $out/bin mosdepth";
3336 fixupPhase = "patchelf --set-rpath ${stdenv.lib.makeLibraryPath [ stdenv.cc.cc htslib pcre ]} $out/bin/mosdepth";
3437
pkgs/development/compilers/nim/default.nix+20−21
@@ -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-10_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
@@ -28,12 +27,21 @@ stdenv.mkDerivation rec {
2827 # used for bootstrapping, but koch insists on moving the nim compiler around
2928 # as part of building it, so it cannot be read-only
3029
30+ nativeBuildInputs = [
31+ makeWrapper nodejs-slim-10_x tzdata coreutils
32+ ];
33+
3134 buildInputs = [
32− makeWrapper nodejs-slim-8_x tzdata coreutils
33− openssl pcre readline sqlite boehmgc sfml
35+ openssl pcre readline boehmgc sfml
3436 ];
3537
38+ phases = [ "unpackPhase" "patchPhase" "buildPhase" "installPhase" "checkPhase" ];
39+
3640 buildPhase = ''
41+ # use $CC to trigger the linker since calling ld in build.sh causes an error
42+ LD=$CC
43+ # build.sh wants to write to $HOME/.cache
44+ HOME=$TMPDIR
3745 sh build.sh
3846 ./bin/nim c koch
3947 ./koch boot -d:release \
@@ -51,33 +59,24 @@ stdenv.mkDerivation rec {
5159 --suffix PATH : ${lib.makeBinPath [ stdenv.cc ]}
5260 '';
5361
54− postPatch =
62+ patchPhase =
5563 let disableTest = ''sed -i '1i discard \"\"\"\n disabled: true\n\"\"\"\n\n' '';
64+ disableStdLibTest = ''sed -i -e '/^when isMainModule/,/^END$/{s/^/#/}' '';
5665 disableCompile = ''sed -i -e 's/^/#/' '';
5766 in ''
5867 substituteInPlace ./tests/async/tioselectors.nim --replace "/bin/sleep" "sleep"
5968 substituteInPlace ./tests/osproc/tworkingdir.nim --replace "/usr/bin" "${coreutils}/bin"
6069 substituteInPlace ./tests/stdlib/ttimes.nim --replace "/usr/share/zoneinfo" "${tzdata}/share/zoneinfo"
6170
62− # disable supposedly broken tests
63− ${disableTest} ./tests/errmsgs/tproper_stacktrace2.nim
64− ${disableTest} ./tests/vm/trgba.nim
65−
6671 # disable tests requiring network access (not available in the build container)
6772 ${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
73+ '' + lib.optionalString stdenv.isAarch64 ''
74+ # disable test supposedly broken on aarch64
75+ ${disableStdLibTest} ./lib/pure/stats.nim
7876 '';
7977
8078 checkPhase = ''
79+ PATH=$PATH:$out/bin
8180 ./koch tests
8281 '';
8382
pkgs/development/tools/nrpl/default.nix+4−1
@@ -25,7 +25,10 @@ stdenv.mkDerivation rec {
2525 "-lpcre"
2626 ];
2727
28− buildPhase = "nim c -d:release nrpl.nim";
28+ buildPhase = ''
29+ HOME=$TMPDIR
30+ nim c -d:release nrpl.nim
31+ '';
2932
3033 installPhase = "install -Dt $out/bin nrpl";
3134