3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/compilers/fpc/lazarus.nix
Ryan Mulligan 8742011824 lazarus: 1.8.0 -> 1.8.2
Semi-automatic update generated by https://github.com/ryantm/nix-update tools. These checks were done:

- built on NixOS
- Warning: no binary found that responded to help or version flags. (This warning appears even if the package isn't expected to have binaries.)
- found 1.8.2 with grep in /nix/store/z3r30kr064x672zqnrs1pwzshlvgnv9n-lazarus-1.8.2
- found 1.8.2 in filename of file in /nix/store/z3r30kr064x672zqnrs1pwzshlvgnv9n-lazarus-1.8.2
- directory tree listing: https://gist.github.com/895d2d01174298ff36a30bc7387286a2
2018-03-20 09:49:12 -07:00

56 lines
1.7 KiB
Nix

{
stdenv, fetchurl
, fpc
, gtk2, glib, pango, atk, gdk_pixbuf
, libXi, inputproto, libX11, xproto, libXext, xextproto
, makeWrapper
}:
let
s =
rec {
version = "1.8.2";
versionSuffix = "";
url = "mirror://sourceforge/lazarus/Lazarus%20Zip%20_%20GZip/Lazarus%20${version}/lazarus-${version}${versionSuffix}.tar.gz";
sha256 = "06ajdnyba3v3d37mjq1yim96hsmbx1w5n695m5zlhjbydgw62a15";
name = "lazarus-${version}";
};
buildInputs = [
fpc gtk2 glib libXi inputproto
libX11 xproto libXext xextproto pango atk
stdenv.cc makeWrapper gdk_pixbuf
];
in
stdenv.mkDerivation {
inherit (s) name version;
inherit buildInputs;
src = fetchurl {
inherit (s) url sha256;
};
makeFlags = [
"FPC=fpc"
"PP=fpc"
"REQUIRE_PACKAGES+=tachartlazaruspkg"
"bigide"
];
preBuild = ''
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 LCL_PLATFORM=gtk2
mkdir -p $out/share "$out/lazarus"
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
'';
postInstall = ''
wrapProgram $out/bin/startlazarus --prefix NIX_LDFLAGS ' ' "'$NIX_LDFLAGS'" \
--prefix LCL_PLATFORM ' ' "'$LCL_PLATFORM'"
'';
meta = {
inherit (s) version;
license = stdenv.lib.licenses.gpl2Plus ;
platforms = stdenv.lib.platforms.linux;
description = "Lazarus graphical IDE for FreePascal language";
homepage = http://www.lazarus.freepascal.org;
maintainers = [stdenv.lib.maintainers.raskin];
};
}