From 0a417845ef00c6964dd2ecf040055bfc3dc7f1f1 Mon Sep 17 00:00:00 2001 From: "Ricardo M. Correia" Date: Wed, 27 Jul 2016 17:51:19 +0200 Subject: [PATCH] ponyc: 0.2.1 -> 2016-07-26 --- pkgs/development/compilers/ponyc/default.nix | 36 +++++++++++-------- .../compilers/ponyc/disable-tests.patch | 16 +++++++++ pkgs/top-level/all-packages.nix | 4 +-- 3 files changed, 38 insertions(+), 18 deletions(-) create mode 100644 pkgs/development/compilers/ponyc/disable-tests.patch diff --git a/pkgs/development/compilers/ponyc/default.nix b/pkgs/development/compilers/ponyc/default.nix index ef355e64e1e..30b96822cab 100644 --- a/pkgs/development/compilers/ponyc/default.nix +++ b/pkgs/development/compilers/ponyc/default.nix @@ -1,29 +1,35 @@ -{stdenv, glibc, fetchFromGitHub, llvm, makeWrapper, openssl, pcre2 }: +{stdenv, glibc, fetchFromGitHub, llvm, makeWrapper, openssl, pcre2, coreutils }: stdenv.mkDerivation { - name = "ponyc-0.2.1"; + name = "ponyc-2016-07-26"; src = fetchFromGitHub { - owner = "CausalityLtd"; + owner = "ponylang"; repo = "ponyc"; - rev = "0.2.1"; - sha256 = "1wmvqrj9v2kjqha9fcs10vfnhdxhc3rf67wpn36ldhs1hq0k25jy"; + rev = "4eec8a9b0d9936b2a0249bd17fd7a2caac6aaa9c"; + sha256 = "184x2jivp7826i60rf0dpx0a9dg5rsj56dv0cll28as4nyqfmna2"; }; buildInputs = [ llvm makeWrapper ]; - makeFlags = [ "config=release" ]; - doCheck = true; - checkTarget = "test"; - - patchPhase = '' - sed 's|/usr/lib/x86_64-linux-gnu/|${glibc.out}/lib/|g' -i src/libponyc/codegen/genexe.c - sed 's|/lib/x86_64-linux-gnu/|${stdenv.cc.cc.lib}/lib/|g' -i src/libponyc/codegen/genexe.c - ''; + # Disable problematic networking tests + patches = [ ./disable-tests.patch ]; preBuild = '' - export LLVM_CONFIG=${llvm}/bin/llvm-config - ''; + # Fix tests + substituteInPlace packages/process/_test.pony \ + --replace "/bin/cat" "${coreutils}/bin/cat" + + export LLVM_CONFIG=${llvm}/bin/llvm-config + ''; + + makeFlags = [ "config=release" ]; + + enableParallelBuilding = true; + + doCheck = true; + + checkTarget = "test"; preCheck = '' export LIBRARY_PATH="$out/lib:${openssl.out}/lib:${pcre2}/lib" diff --git a/pkgs/development/compilers/ponyc/disable-tests.patch b/pkgs/development/compilers/ponyc/disable-tests.patch new file mode 100644 index 00000000000..9335ebd6eea --- /dev/null +++ b/pkgs/development/compilers/ponyc/disable-tests.patch @@ -0,0 +1,16 @@ +diff --git a/packages/net/_test.pony b/packages/net/_test.pony +index d6c3e56..dc37dd9 100644 +--- a/packages/net/_test.pony ++++ b/packages/net/_test.pony +@@ -7,11 +7,6 @@ actor Main is TestList + fun tag tests(test: PonyTest) => + test(_TestReadBuffer) + test(_TestWriteBuffer) +- test(_TestBroadcast) +- ifdef not windows then +- test(_TestTCPExpect) +- test(_TestTCPWritev) +- end + + class iso _TestReadBuffer is UnitTest + """ diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b1ee80f669e..2023297bbd3 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5463,9 +5463,7 @@ in stdenv = overrideCC stdenv gcc49; }; - ponyc = callPackage ../development/compilers/ponyc { - llvm = llvm_36; - }; + ponyc = callPackage ../development/compilers/ponyc { }; qcmm = callPackage ../development/compilers/qcmm { lua = lua4;