|
|
|
@ -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 |
|
|
|
|