diff options
Diffstat (limited to 'pkgs/development/compilers/fpc/lazarus.nix')
-rw-r--r-- | pkgs/development/compilers/fpc/lazarus.nix | 66 |
1 files changed, 38 insertions, 28 deletions
diff --git a/pkgs/development/compilers/fpc/lazarus.nix b/pkgs/development/compilers/fpc/lazarus.nix index a2863663bea..06c4f6bbe2b 100644 --- a/pkgs/development/compilers/fpc/lazarus.nix +++ b/pkgs/development/compilers/fpc/lazarus.nix @@ -1,45 +1,55 @@ -args : with args; -rec { - version = "1.0.2"; - versionSuffix = "-0"; - src = fetchurl { +{ +stdenv, fetchurl +, fpc +, gtk, glib, pango, atk, gdk_pixbuf +, 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"; - sha256 = "17a94wig8b4yrkq42wng4qbal7n77axkynwh78wday5whsp7div8"; + sha256 = "1sjyc2l46hyd5ic5hr6vscy4qr9kazyhiyddy7bfs9vgf54fdiy0"; + name = "lazarus-${version}"; }; - - buildInputs = [fpc gtk glib libXi inputproto + buildInputs = [ + fpc gtk glib libXi inputproto libX11 xproto libXext xextproto pango atk - stdenv.gcc makeWrapper gdk_pixbuf]; - configureFlags = []; + stdenv.cc makeWrapper gdk_pixbuf + ]; +in +stdenv.mkDerivation { + inherit (s) name version; + inherit buildInputs; + src = fetchurl { + inherit (s) url sha256; + }; makeFlags = [ - "LAZARUS_INSTALL_DIR=$out/lazarus/" - "INSTALL_PREFIX=$out/" "FPC=fpc" "PP=fpc" + "REQUIRE_PACKAGES+=tachartlazaruspkg" + "bigide" ]; - - /* doConfigure should be specified separately */ - phaseNames = ["preBuild" "doMakeInstall" "postInstall"]; - - 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' + preBuild = '' + export makeFlags="$makeFlags LAZARUS_INSTALL_DIR=$out/lazarus/ INSTALL_PREFIX=$out/" + export NIX_LDFLAGS="$NIX_LDFLAGS -L${stdenv.cc.cc}/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 + 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 - '') - ["minInit" "defEnsureDir" "doUnpack"]; - - postInstall = fullDepEntry ('' + ''; + postInstall = '' wrapProgram $out/bin/startlazarus --prefix NIX_LDFLAGS ' ' "'$NIX_LDFLAGS'" \ --prefix LCL_PLATFORM ' ' "'$LCL_PLATFORM'" - '') ["doMakeInstall" "minInit" "defEnsureDir"]; - - name = "lazarus-${version}"; + ''; 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 = [args.lib.maintainers.raskin]; - #platforms = args.lib.platforms.linux; + maintainers = [stdenv.lib.maintainers.raskin]; }; } |