Merge pull request #10598 from doublec/ponylang

Package for Pony programming language compiler 0.2.1.
This commit is contained in:
goibhniu 2015-10-25 21:56:36 +01:00
commit d2287b9faa
2 changed files with 51 additions and 0 deletions

View File

@ -0,0 +1,47 @@
{stdenv, glibc, fetchFromGitHub, llvm, makeWrapper, openssl, pcre2 }:
stdenv.mkDerivation {
name = "ponyc-0.2.1";
src = fetchFromGitHub {
owner = "CausalityLtd";
repo = "ponyc";
rev = "0.2.1";
sha256 = "1wmvqrj9v2kjqha9fcs10vfnhdxhc3rf67wpn36ldhs1hq0k25jy";
};
buildInputs = [ llvm makeWrapper ];
makeFlags = [ "config=release" ];
doCheck = true;
checkTarget = "test";
patchPhase = ''
sed 's|/usr/lib/x86_64-linux-gnu/|${glibc}/lib/|g' -i src/libponyc/codegen/genexe.c
sed 's|/lib/x86_64-linux-gnu/|${stdenv.cc.cc}/lib/|g' -i src/libponyc/codegen/genexe.c
'';
preBuild = ''
export LLVM_CONFIG=${llvm}/bin/llvm-config
'';
preCheck = ''
export LIBRARY_PATH="$out/lib:${openssl}/lib:${pcre2}/lib"
'';
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" \
--prefix LIBRARY_PATH : "${openssl}/lib" \
--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 ];
};
}

View File

@ -4729,6 +4729,10 @@ let
ocamlnat = newScope pkgs.ocamlPackages_3_12_1 ../development/ocaml-modules/ocamlnat { };
ponyc = callPackage ../development/compilers/ponyc {
llvm = llvm_36;
};
qcmm = callPackage ../development/compilers/qcmm {
lua = lua4;
ocaml = ocaml_3_08_0;