1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-22 13:41:26 +00:00
nixpkgs/pkgs/development/compilers/ponyc/default.nix

55 lines
1.4 KiB
Nix
Raw Normal View History

2016-07-27 16:51:19 +01:00
{stdenv, glibc, fetchFromGitHub, llvm, makeWrapper, openssl, pcre2, coreutils }:
stdenv.mkDerivation {
2016-07-27 16:51:19 +01:00
name = "ponyc-2016-07-26";
src = fetchFromGitHub {
2016-07-27 16:51:19 +01:00
owner = "ponylang";
repo = "ponyc";
2016-07-27 16:51:19 +01:00
rev = "4eec8a9b0d9936b2a0249bd17fd7a2caac6aaa9c";
sha256 = "184x2jivp7826i60rf0dpx0a9dg5rsj56dv0cll28as4nyqfmna2";
};
buildInputs = [ llvm makeWrapper ];
2016-07-27 16:51:19 +01:00
# Disable problematic networking tests
patches = [ ./disable-tests.patch ];
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
'';
2016-07-27 16:51:19 +01:00
makeFlags = [ "config=release" ];
enableParallelBuilding = true;
doCheck = true;
checkTarget = "test";
preCheck = ''
export LIBRARY_PATH="$out/lib:${openssl.out}/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.out}/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 ];
platforms = stdenv.lib.platforms.linux;
};
}