mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-19 18:44:13 +00:00
Refactor Lazarus build a bit and build it with all the components by default
This commit is contained in:
parent
f33436596b
commit
689f1af563
@ -1,45 +1,55 @@
|
|||||||
args : with args;
|
{
|
||||||
rec {
|
stdenv, fetchurl
|
||||||
version = "1.2.6";
|
, fpc
|
||||||
versionSuffix = "-0";
|
, gtk, glib, pango, atk, gdk_pixbuf
|
||||||
src = fetchurl {
|
, libXi, inputproto, libX11, xproto, libXext, xextproto
|
||||||
|
, makeWrapper
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
s =
|
||||||
|
rec {
|
||||||
|
version = "1.2.6";
|
||||||
|
versionSuffix = "-0";
|
||||||
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}${versionSuffix}.tar.gz";
|
||||||
sha256 = "1sjyc2l46hyd5ic5hr6vscy4qr9kazyhiyddy7bfs9vgf54fdiy0";
|
sha256 = "1sjyc2l46hyd5ic5hr6vscy4qr9kazyhiyddy7bfs9vgf54fdiy0";
|
||||||
|
name = "lazarus-${version}";
|
||||||
};
|
};
|
||||||
|
buildInputs = [
|
||||||
buildInputs = [fpc gtk glib libXi inputproto
|
fpc gtk glib libXi inputproto
|
||||||
libX11 xproto libXext xextproto pango atk
|
libX11 xproto libXext xextproto pango atk
|
||||||
stdenv.gcc makeWrapper gdk_pixbuf];
|
stdenv.gcc makeWrapper gdk_pixbuf
|
||||||
configureFlags = [];
|
];
|
||||||
|
in
|
||||||
|
stdenv.mkDerivation {
|
||||||
|
inherit (s) name version;
|
||||||
|
inherit buildInputs;
|
||||||
|
src = fetchurl {
|
||||||
|
inherit (s) url sha256;
|
||||||
|
};
|
||||||
makeFlags = [
|
makeFlags = [
|
||||||
"LAZARUS_INSTALL_DIR=$out/lazarus/"
|
|
||||||
"INSTALL_PREFIX=$out/"
|
|
||||||
"FPC=fpc"
|
"FPC=fpc"
|
||||||
"PP=fpc"
|
"PP=fpc"
|
||||||
|
"REQUIRE_PACKAGES+=tachartlazaruspkg"
|
||||||
|
"bigide"
|
||||||
];
|
];
|
||||||
|
preBuild = ''
|
||||||
/* doConfigure should be specified separately */
|
export makeFlags="$makeFlags LAZARUS_INSTALL_DIR=$out/lazarus/ INSTALL_PREFIX=$out/"
|
||||||
phaseNames = ["preBuild" "doMakeInstall" "postInstall"];
|
export NIX_LDFLAGS="$NIX_LDFLAGS -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"
|
||||||
|
|
||||||
preBuild = fullDepEntry (''
|
|
||||||
export NIX_LDFLAGS='-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'
|
|
||||||
export LCL_PLATFORM=gtk2
|
export LCL_PLATFORM=gtk2
|
||||||
mkdir -p $out/share "$out/lazarus"
|
mkdir -p $out/share "$out/lazarus"
|
||||||
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
|
||||||
'')
|
'';
|
||||||
["minInit" "defEnsureDir" "doUnpack"];
|
postInstall = ''
|
||||||
|
|
||||||
postInstall = fullDepEntry (''
|
|
||||||
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'"
|
||||||
'') ["doMakeInstall" "minInit" "defEnsureDir"];
|
'';
|
||||||
|
|
||||||
name = "lazarus-${version}";
|
|
||||||
meta = {
|
meta = {
|
||||||
|
inherit (s) version;
|
||||||
|
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 = [args.lib.maintainers.raskin];
|
maintainers = [stdenv.lib.maintainers.raskin];
|
||||||
#platforms = args.lib.platforms.linux;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -3442,9 +3442,7 @@ let
|
|||||||
};
|
};
|
||||||
julia = julia031;
|
julia = julia031;
|
||||||
|
|
||||||
lazarus = builderDefsPackage (import ../development/compilers/fpc/lazarus.nix) {
|
lazarus = callPackage ../development/compilers/fpc/lazarus.nix {
|
||||||
inherit makeWrapper gtk glib pango atk gdk_pixbuf;
|
|
||||||
inherit (xlibs) libXi inputproto libX11 xproto libXext xextproto;
|
|
||||||
fpc = fpc;
|
fpc = fpc;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user