Merge pull request #55746 from bhipple/fix/lazarus

lazarus: format expression with more modern style
This commit is contained in:
Michael Raskin 2019-02-14 06:50:43 +00:00 committed by GitHub
commit 0dca6a43ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 18 additions and 25 deletions

View File

@ -1,37 +1,29 @@
{ { stdenv, fetchurl, makeWrapper
stdenv, fetchurl , fpc, gtk2, glib, pango, atk, gdk_pixbuf
, fpc
, gtk2, glib, pango, atk, gdk_pixbuf
, libXi, xorgproto, libX11, libXext , libXi, xorgproto, libX11, libXext
, makeWrapper
}: }:
let stdenv.mkDerivation rec {
s = name = "lazarus-${version}";
rec { version = "1.8.4";
version = "1.8.4";
versionSuffix = ""; src = fetchurl {
url = "mirror://sourceforge/lazarus/Lazarus%20Zip%20_%20GZip/Lazarus%20${version}/lazarus-${version}${versionSuffix}.tar.gz"; url = "mirror://sourceforge/lazarus/Lazarus%20Zip%20_%20GZip/Lazarus%20${version}/lazarus-${version}.tar.gz";
sha256 = "1s8hdip973fc1lynklddl0mvg2jd2lzkfk8hzb8jlchs6jn0362s"; sha256 = "1s8hdip973fc1lynklddl0mvg2jd2lzkfk8hzb8jlchs6jn0362s";
name = "lazarus-${version}";
}; };
buildInputs = [ buildInputs = [
fpc gtk2 glib libXi xorgproto fpc gtk2 glib libXi xorgproto
libX11 libXext pango atk libX11 libXext pango atk
stdenv.cc makeWrapper gdk_pixbuf stdenv.cc makeWrapper gdk_pixbuf
]; ];
in
stdenv.mkDerivation {
inherit (s) name version;
inherit buildInputs;
src = fetchurl {
inherit (s) url sha256;
};
makeFlags = [ makeFlags = [
"FPC=fpc" "FPC=fpc"
"PP=fpc" "PP=fpc"
"REQUIRE_PACKAGES+=tachartlazaruspkg" "REQUIRE_PACKAGES+=tachartlazaruspkg"
"bigide" "bigide"
]; ];
preBuild = '' preBuild = ''
export makeFlags="$makeFlags LAZARUS_INSTALL_DIR=$out/share/lazarus/ INSTALL_PREFIX=$out/" export makeFlags="$makeFlags LAZARUS_INSTALL_DIR=$out/share/lazarus/ INSTALL_PREFIX=$out/"
export NIX_LDFLAGS="$NIX_LDFLAGS -L${stdenv.cc.cc.lib}/lib -lXi -lX11 -lglib-2.0 -lgtk-x11-2.0 -lgdk-x11-2.0 -lc -lXext -lpango-1.0 -latk-1.0 -lgdk_pixbuf-2.0 -lcairo -lgcc_s" export NIX_LDFLAGS="$NIX_LDFLAGS -L${stdenv.cc.cc.lib}/lib -lXi -lX11 -lglib-2.0 -lgtk-x11-2.0 -lgdk-x11-2.0 -lc -lXext -lpango-1.0 -latk-1.0 -lgdk_pixbuf-2.0 -lcairo -lgcc_s"
@ -40,16 +32,17 @@ stdenv.mkDerivation {
tar xf ${fpc.src} --strip-components=1 -C $out/share -m tar xf ${fpc.src} --strip-components=1 -C $out/share -m
sed -e 's@/usr/fpcsrc@'"$out/share/fpcsrc@" -i ide/include/unix/lazbaseconf.inc sed -e 's@/usr/fpcsrc@'"$out/share/fpcsrc@" -i ide/include/unix/lazbaseconf.inc
''; '';
postInstall = '' postInstall = ''
wrapProgram $out/bin/startlazarus --prefix NIX_LDFLAGS ' ' "'$NIX_LDFLAGS'" \ wrapProgram $out/bin/startlazarus --prefix NIX_LDFLAGS ' ' "'$NIX_LDFLAGS'" \
--prefix LCL_PLATFORM ' ' "'$LCL_PLATFORM'" --prefix LCL_PLATFORM ' ' "'$LCL_PLATFORM'"
''; '';
meta = {
inherit (s) version; meta = with stdenv.lib; {
license = stdenv.lib.licenses.gpl2Plus ;
platforms = stdenv.lib.platforms.linux;
description = "Lazarus graphical IDE for FreePascal language"; description = "Lazarus graphical IDE for FreePascal language";
homepage = http://www.lazarus.freepascal.org; homepage = http://www.lazarus.freepascal.org;
maintainers = [stdenv.lib.maintainers.raskin]; license = licenses.gpl2Plus ;
platforms = platforms.linux;
maintainers = [ maintainers.raskin ];
}; };
} }