Merge pull request #56670 from dtzWill/update/pony-0.27.0
ponyc: 0.26.0 -> 0.27.0, cleanup, use recent LLVM
This commit is contained in:
commit
209ab53069
@ -3,13 +3,13 @@
|
||||
|
||||
stdenv.mkDerivation ( rec {
|
||||
name = "ponyc-${version}";
|
||||
version = "0.26.0";
|
||||
version = "0.27.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ponylang";
|
||||
repo = "ponyc";
|
||||
rev = version;
|
||||
sha256 = "1k1ysqk7j8kpysndps2ic9hprvp0z0d32d6jvqlapjrfccghy7dh";
|
||||
sha256 = "11vdfvv9xirfi92y7zza9pqimfx33w74vw7rg5n7l60qqc8y2cla";
|
||||
};
|
||||
|
||||
buildInputs = [ llvm makeWrapper which ];
|
||||
@ -25,25 +25,15 @@ stdenv.mkDerivation ( rec {
|
||||
substituteInPlace packages/process/_test.pony \
|
||||
--replace '=/bin' "${coreutils}/bin"
|
||||
|
||||
|
||||
# Fix llvm-ar check for darwin
|
||||
substituteInPlace Makefile \
|
||||
--replace "llvm-ar-3.8" "llvm-ar"
|
||||
|
||||
# Remove impure system refs
|
||||
substituteInPlace src/libponyc/pkg/package.c \
|
||||
--replace "/usr/local/lib" ""
|
||||
substituteInPlace src/libponyc/pkg/package.c \
|
||||
--replace "/usr/local/lib" "" \
|
||||
--replace "/opt/local/lib" ""
|
||||
|
||||
for file in `grep -irl '/usr/local/opt/libressl/lib' ./*`; do
|
||||
substituteInPlace $file --replace '/usr/local/opt/libressl/lib' "${stdenv.lib.getLib libressl}/lib"
|
||||
done
|
||||
|
||||
# Fix ponypath issue
|
||||
substituteInPlace Makefile \
|
||||
--replace "PONYPATH=." "PONYPATH=.:\$(PONYPATH)"
|
||||
|
||||
export LLVM_CONFIG=${llvm}/bin/llvm-config
|
||||
'' + stdenv.lib.optionalString ((!stdenv.isDarwin) && (!cc.isClang) && lto) ''
|
||||
export LTO_PLUGIN=`find ${cc.cc}/ -name liblto_plugin.so`
|
||||
@ -73,9 +63,7 @@ stdenv.mkDerivation ( rec {
|
||||
wrapProgram $out/bin/ponyc \
|
||||
--prefix PATH ":" "${stdenv.cc}/bin" \
|
||||
--set-default CC "$CC" \
|
||||
--prefix PONYPATH : "$out/lib" \
|
||||
--prefix PONYPATH : "${stdenv.lib.getLib pcre2}/lib" \
|
||||
--prefix PONYPATH : "${stdenv.lib.getLib libressl}/lib"
|
||||
--prefix PONYPATH : "${stdenv.lib.makeLibraryPath [ pcre2 libressl (placeholder "out") ]}"
|
||||
'';
|
||||
|
||||
# Stripping breaks linking for ponyc
|
||||
|
@ -2,20 +2,18 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "pony-stable-${version}";
|
||||
version = "0.1.6";
|
||||
version = "0.2.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ponylang";
|
||||
repo = "pony-stable";
|
||||
rev = version;
|
||||
sha256 = "02lqba75psnxcxj2y8lm1fy1hmwa088nvxjghhpnlkqbwz7wa2sw";
|
||||
sha256 = "0zzcq0vsl6kcrsxwqzd3s9mq7aq5sg8si5c83rxyi9n6a06gnbh7";
|
||||
};
|
||||
|
||||
buildInputs = [ ponyc ];
|
||||
|
||||
installPhase = ''
|
||||
make prefix=$out install
|
||||
'';
|
||||
installFlags = [ "prefix=${placeholder "out"}" "install" ];
|
||||
|
||||
meta = {
|
||||
description = "A simple dependency manager for the Pony language.";
|
||||
|
@ -7512,7 +7512,7 @@ in
|
||||
};
|
||||
|
||||
ponyc = callPackage ../development/compilers/ponyc {
|
||||
llvm = llvm_39;
|
||||
llvm = llvm_7;
|
||||
};
|
||||
|
||||
pony-stable = callPackage ../development/compilers/ponyc/pony-stable.nix { };
|
||||
|
Loading…
Reference in New Issue
Block a user