about summary refs log tree commit diff
path: root/pkgs/development/interpreters/racket/racket_7_9.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/interpreters/racket/racket_7_9.nix')
-rw-r--r--pkgs/development/interpreters/racket/racket_7_9.nix117
1 files changed, 78 insertions, 39 deletions
diff --git a/pkgs/development/interpreters/racket/racket_7_9.nix b/pkgs/development/interpreters/racket/racket_7_9.nix
index 836bc879dbbca..1446be8f24600 100644
--- a/pkgs/development/interpreters/racket/racket_7_9.nix
+++ b/pkgs/development/interpreters/racket/racket_7_9.nix
@@ -1,26 +1,39 @@
-{ lib, stdenv, fetchurl, makeFontsConf
-, cacert
-, cairo, coreutils, fontconfig, freefont_ttf
-, glib, gmp
-, gtk3
-, libedit, libffi
-, libiconv
-, libGL
-, libGLU
-, libjpeg
-, libpng, libtool, mpfr, openssl, pango, poppler
-, readline, sqlite
-, disableDocs ? false
-, CoreFoundation
-, gsettings-desktop-schemas
-, wrapGAppsHook
+{
+  lib,
+  stdenv,
+  fetchurl,
+  makeFontsConf,
+  cacert,
+  cairo,
+  coreutils,
+  fontconfig,
+  freefont_ttf,
+  glib,
+  gmp,
+  gtk3,
+  libedit,
+  libffi,
+  libiconv,
+  libGL,
+  libGLU,
+  libjpeg,
+  libpng,
+  libtool,
+  mpfr,
+  openssl,
+  pango,
+  poppler,
+  readline,
+  sqlite,
+  disableDocs ? false,
+  CoreFoundation,
+  gsettings-desktop-schemas,
+  wrapGAppsHook3,
 }:
 
 let
 
-  fontsConf = makeFontsConf {
-    fontDirectories = [ freefont_ttf ];
-  };
+  fontsConf = makeFontsConf { fontDirectories = [ freefont_ttf ]; };
 
   libPath = lib.makeLibraryPath [
     cairo
@@ -41,34 +54,50 @@ let
     readline
     sqlite
   ];
-
 in
 
 stdenv.mkDerivation rec {
   pname = "racket";
   version = "7.9"; # always change at once with ./minimal.nix
 
-  src = (lib.makeOverridable ({ name, sha256 }:
-    fetchurl {
-      url = "https://mirror.racket-lang.org/installers/${version}/${name}-src.tgz";
-      inherit sha256;
-    }
-  )) {
-    name = "${pname}-${version}";
-    sha256 = "0gmp2ahmfd97nn9bwpfx9lznjmjkd042slnrrbdmyh59cqh98y2m";
-  };
+  src =
+    (lib.makeOverridable (
+      { name, sha256 }:
+      fetchurl {
+        url = "https://mirror.racket-lang.org/installers/${version}/${name}-src.tgz";
+        inherit sha256;
+      }
+    ))
+      {
+        name = "${pname}-${version}";
+        sha256 = "0gmp2ahmfd97nn9bwpfx9lznjmjkd042slnrrbdmyh59cqh98y2m";
+      };
 
   FONTCONFIG_FILE = fontsConf;
   LD_LIBRARY_PATH = libPath;
   NIX_LDFLAGS = lib.concatStringsSep " " [
-    (lib.optionalString (stdenv.cc.isGNU && ! stdenv.isDarwin) "-lgcc_s")
+    (lib.optionalString (stdenv.cc.isGNU && !stdenv.isDarwin) "-lgcc_s")
     (lib.optionalString stdenv.isDarwin "-framework CoreFoundation")
   ];
 
-  nativeBuildInputs = [ cacert wrapGAppsHook ];
+  nativeBuildInputs = [
+    cacert
+    wrapGAppsHook3
+  ];
 
-  buildInputs = [ fontconfig libffi libtool sqlite gsettings-desktop-schemas gtk3 ]
-    ++ lib.optionals stdenv.isDarwin [ libiconv CoreFoundation ];
+  buildInputs =
+    [
+      fontconfig
+      libffi
+      libtool
+      sqlite
+      gsettings-desktop-schemas
+      gtk3
+    ]
+    ++ lib.optionals stdenv.isDarwin [
+      libiconv
+      CoreFoundation
+    ];
 
   preConfigure = ''
     unset AR
@@ -82,15 +111,18 @@ stdenv.mkDerivation rec {
   '';
 
   shared = if stdenv.isDarwin then "dylib" else "shared";
-  configureFlags = [ "--enable-${shared}"  "--enable-lt=${libtool}/bin/libtool" ]
-                   ++ lib.optionals disableDocs [ "--disable-docs" ]
-                   ++ lib.optionals stdenv.isDarwin [ "--enable-xonx" ];
+  configureFlags =
+    [
+      "--enable-${shared}"
+      "--enable-lt=${libtool}/bin/libtool"
+    ]
+    ++ lib.optionals disableDocs [ "--disable-docs" ]
+    ++ lib.optionals stdenv.isDarwin [ "--enable-xonx" ];
 
   configureScript = "../configure";
 
   enableParallelBuilding = false;
 
-
   meta = with lib; {
     description = "A programmable programming language";
     longDescription = ''
@@ -103,9 +135,16 @@ stdenv.mkDerivation rec {
       GUIs and charts.
     '';
     homepage = "https://racket-lang.org/";
-    license = with licenses; [ asl20 /* or */ mit ];
+    license = with licenses; [
+      asl20 # or
+      mit
+    ];
     maintainers = with maintainers; [ vrthra ];
-    platforms = [ "x86_64-darwin" "x86_64-linux" "aarch64-linux" ];
+    platforms = [
+      "x86_64-darwin"
+      "x86_64-linux"
+      "aarch64-linux"
+    ];
     broken = stdenv.isDarwin; # No support yet for setting FFI lookup path
   };
 }