2016-07-27 16:51:19 +01:00
|
|
|
{stdenv, glibc, fetchFromGitHub, llvm, makeWrapper, openssl, pcre2, coreutils }:
|
2015-10-25 10:08:02 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2016-07-27 16:51:19 +01:00
|
|
|
name = "ponyc-2016-07-26";
|
2015-10-25 10:08:02 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2016-07-27 16:51:19 +01:00
|
|
|
owner = "ponylang";
|
2015-10-25 10:08:02 +00:00
|
|
|
repo = "ponyc";
|
2016-07-27 16:51:19 +01:00
|
|
|
rev = "4eec8a9b0d9936b2a0249bd17fd7a2caac6aaa9c";
|
|
|
|
sha256 = "184x2jivp7826i60rf0dpx0a9dg5rsj56dv0cll28as4nyqfmna2";
|
2015-10-25 10:08:02 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ llvm makeWrapper ];
|
|
|
|
|
2016-07-27 16:51:19 +01:00
|
|
|
# Disable problematic networking tests
|
|
|
|
patches = [ ./disable-tests.patch ];
|
2015-10-25 10:08:02 +00:00
|
|
|
|
2016-07-27 16:51:19 +01:00
|
|
|
preBuild = ''
|
|
|
|
# Fix tests
|
|
|
|
substituteInPlace packages/process/_test.pony \
|
|
|
|
--replace "/bin/cat" "${coreutils}/bin/cat"
|
|
|
|
|
|
|
|
export LLVM_CONFIG=${llvm}/bin/llvm-config
|
2015-10-25 10:08:02 +00:00
|
|
|
'';
|
|
|
|
|
2016-07-27 16:51:19 +01:00
|
|
|
makeFlags = [ "config=release" ];
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
checkTarget = "test";
|
2015-10-25 10:08:02 +00:00
|
|
|
|
|
|
|
preCheck = ''
|
2016-08-23 00:13:46 +01:00
|
|
|
export LIBRARY_PATH="$out/lib:${stdenv.lib.makeLibraryPath [ openssl pcre2 ]}"
|
2015-10-25 10:08:02 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
make config=release prefix=$out install
|
|
|
|
mv $out/bin/ponyc $out/bin/ponyc.wrapped
|
|
|
|
makeWrapper $out/bin/ponyc.wrapped $out/bin/ponyc \
|
|
|
|
--prefix LIBRARY_PATH : "$out/lib" \
|
2016-01-24 07:30:05 +00:00
|
|
|
--prefix LIBRARY_PATH : "${openssl.out}/lib" \
|
2015-10-25 10:08:02 +00:00
|
|
|
--prefix LIBRARY_PATH : "${pcre2}/lib"
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Pony is an Object-oriented, actor-model, capabilities-secure, high performance programming language";
|
|
|
|
homepage = http://www.ponylang.org;
|
|
|
|
license = stdenv.lib.licenses.bsd2;
|
|
|
|
maintainers = [ stdenv.lib.maintainers.doublec ];
|
2016-08-02 18:50:55 +01:00
|
|
|
platforms = stdenv.lib.platforms.linux;
|
2015-10-25 10:08:02 +00:00
|
|
|
};
|
|
|
|
}
|