Merge pull request #88839 from 7c6f434c/fix-lazarus

lazarus: fix linking by the IDE;
This commit is contained in:
Michael Raskin 2020-05-25 00:32:22 +00:00 committed by GitHub
commit 71231b6407
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,6 +1,7 @@
{ stdenv, fetchurl, makeWrapper
, fpc, gtk2, glib, pango, atk, gdk-pixbuf
, libXi, xorgproto, libX11, libXext
, gdb, gnumake, binutils
}:
stdenv.mkDerivation rec {
pname = "lazarus";
@ -34,8 +35,12 @@ stdenv.mkDerivation rec {
'';
postInstall = ''
wrapProgram $out/bin/startlazarus --prefix NIX_LDFLAGS ' ' "'$NIX_LDFLAGS'" \
--prefix LCL_PLATFORM ' ' "'$LCL_PLATFORM'"
wrapProgram $out/bin/startlazarus --prefix NIX_LDFLAGS ' ' \
"$(echo "$NIX_LDFLAGS" | sed -re 's/-rpath [^ ]+//g')" \
--prefix NIX_${binutils.infixSalt}_LDFLAGS ' ' \
"$(echo "$NIX_LDFLAGS" | sed -re 's/-rpath [^ ]+//g')" \
--prefix LCL_PLATFORM ' ' "$LCL_PLATFORM" \
--prefix PATH ':' "${fpc}/bin:${gdb}/bin:${gnumake}/bin:${binutils}/bin"
'';
meta = with stdenv.lib; {