From aba880189a50f13ab5cbd1f4e6f0bf3810d6d1b0 Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Sat, 2 Mar 2019 02:08:34 -0600 Subject: [PATCH] ponyc: cleanup a bit, mostly remove old source fixups no longer needed --- pkgs/development/compilers/ponyc/default.nix | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/pkgs/development/compilers/ponyc/default.nix b/pkgs/development/compilers/ponyc/default.nix index c1fbeefe2bdf..767eafc456c0 100644 --- a/pkgs/development/compilers/ponyc/default.nix +++ b/pkgs/development/compilers/ponyc/default.nix @@ -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