about summary refs log tree commit diff
path: root/pkgs/development/compilers
diff options
context:
space:
mode:
authorBenjamin Hipple <bhipple@protonmail.com>2019-02-13 23:35:45 -0500
committerBenjamin Hipple <bhipple@protonmail.com>2019-02-13 23:39:19 -0500
commit444b26e3b5df0d3207b08c0e0102d27d07403d15 (patch)
tree596f621519bde922669ae70520c7d93dff314b29 /pkgs/development/compilers
parentac29d96d25ac361a083a27f2f4a57f52d2817c20 (diff)
downloadnixlib-444b26e3b5df0d3207b08c0e0102d27d07403d15.tar
nixlib-444b26e3b5df0d3207b08c0e0102d27d07403d15.tar.gz
nixlib-444b26e3b5df0d3207b08c0e0102d27d07403d15.tar.bz2
nixlib-444b26e3b5df0d3207b08c0e0102d27d07403d15.tar.lz
nixlib-444b26e3b5df0d3207b08c0e0102d27d07403d15.tar.xz
nixlib-444b26e3b5df0d3207b08c0e0102d27d07403d15.tar.zst
nixlib-444b26e3b5df0d3207b08c0e0102d27d07403d15.zip
lazarus: format expression with more modern style
This package was written more than a decade ago; this commit updates the layout
to be more conventional without making any meaningful changes. Note that because
it now has a version attribute in the derivation this does change the hash.
Diffstat (limited to 'pkgs/development/compilers')
-rw-r--r--pkgs/development/compilers/fpc/lazarus.nix43
1 files changed, 18 insertions, 25 deletions
diff --git a/pkgs/development/compilers/fpc/lazarus.nix b/pkgs/development/compilers/fpc/lazarus.nix
index 8507fe4b222e..74ca246deb09 100644
--- a/pkgs/development/compilers/fpc/lazarus.nix
+++ b/pkgs/development/compilers/fpc/lazarus.nix
@@ -1,37 +1,29 @@
-{
-stdenv, fetchurl
-, fpc
-, gtk2, glib, pango, atk, gdk_pixbuf
+{ stdenv, fetchurl, makeWrapper
+, fpc, gtk2, glib, pango, atk, gdk_pixbuf
 , libXi, xorgproto, libX11, libXext
-, makeWrapper
 }:
-let
-  s =
-  rec {
-    version = "1.8.4";
-    versionSuffix = "";
-    url = "mirror://sourceforge/lazarus/Lazarus%20Zip%20_%20GZip/Lazarus%20${version}/lazarus-${version}${versionSuffix}.tar.gz";
+stdenv.mkDerivation rec {
+  name = "lazarus-${version}";
+  version = "1.8.4";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/lazarus/Lazarus%20Zip%20_%20GZip/Lazarus%20${version}/lazarus-${version}.tar.gz";
     sha256 = "1s8hdip973fc1lynklddl0mvg2jd2lzkfk8hzb8jlchs6jn0362s";
-    name = "lazarus-${version}";
   };
+
   buildInputs = [
     fpc gtk2 glib libXi xorgproto
     libX11 libXext 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"
@@ -40,16 +32,17 @@ stdenv.mkDerivation {
     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'"
+      --prefix LCL_PLATFORM ' ' "'$LCL_PLATFORM'"
   '';
-  meta = {
-    inherit (s) version;
-    license = stdenv.lib.licenses.gpl2Plus ;
-    platforms = stdenv.lib.platforms.linux;
+
+  meta = with stdenv.lib; {
     description = "Lazarus graphical IDE for FreePascal language";
     homepage = http://www.lazarus.freepascal.org;
-    maintainers = [stdenv.lib.maintainers.raskin];
+    license = licenses.gpl2Plus ;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.raskin ];
   };
 }