diff options
author | Chris Double <chris.double@double.co.nz> | 2015-10-25 23:08:02 +1300 |
---|---|---|
committer | Chris Double <chris.double@double.co.nz> | 2015-10-26 08:32:57 +1300 |
commit | e261492bb03398a137ea4ea6644c7865df191651 (patch) | |
tree | 2779d60b6f415a3135b46bbb6b560d3eccb6bac5 /pkgs/development/compilers/ponyc | |
parent | 7477a7cdda2ad9bd016f1f75875c855a7a680a93 (diff) | |
download | nixlib-e261492bb03398a137ea4ea6644c7865df191651.tar nixlib-e261492bb03398a137ea4ea6644c7865df191651.tar.gz nixlib-e261492bb03398a137ea4ea6644c7865df191651.tar.bz2 nixlib-e261492bb03398a137ea4ea6644c7865df191651.tar.lz nixlib-e261492bb03398a137ea4ea6644c7865df191651.tar.xz nixlib-e261492bb03398a137ea4ea6644c7865df191651.tar.zst nixlib-e261492bb03398a137ea4ea6644c7865df191651.zip |
Package for Pony programming language compiler 0.2.1.
Pony is an open-source, object-oriented, actor-model, capabilities-secure, high performance programming language.
Diffstat (limited to 'pkgs/development/compilers/ponyc')
-rw-r--r-- | pkgs/development/compilers/ponyc/default.nix | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/pkgs/development/compilers/ponyc/default.nix b/pkgs/development/compilers/ponyc/default.nix new file mode 100644 index 000000000000..c94ba203c0ff --- /dev/null +++ b/pkgs/development/compilers/ponyc/default.nix @@ -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 ]; + }; +} |