1 { lib, stdenv, fetchurl, makeFontsConf
3 , cairo, coreutils, fontconfig, freefont_ttf
11 , libpng, libtool, mpfr, openssl, pango, poppler
15 , gsettings-desktop-schemas
21 fontsConf = makeFontsConf {
22 fontDirectories = [ freefont_ttf ];
25 libPath = lib.makeLibraryPath [
31 gsettings-desktop-schemas
47 stdenv.mkDerivation rec {
49 version = "7.9"; # always change at once with ./minimal.nix
51 src = (lib.makeOverridable ({ name, sha256 }:
53 url = "https://mirror.racket-lang.org/installers/${version}/${name}-src.tgz";
57 name = "${pname}-${version}";
58 sha256 = "0gmp2ahmfd97nn9bwpfx9lznjmjkd042slnrrbdmyh59cqh98y2m";
61 FONTCONFIG_FILE = fontsConf;
62 LD_LIBRARY_PATH = libPath;
63 NIX_LDFLAGS = lib.concatStringsSep " " [
64 (lib.optionalString (stdenv.cc.isGNU && ! stdenv.isDarwin) "-lgcc_s")
65 (lib.optionalString stdenv.isDarwin "-framework CoreFoundation")
68 nativeBuildInputs = [ cacert wrapGAppsHook ];
70 buildInputs = [ fontconfig libffi libtool sqlite gsettings-desktop-schemas gtk3 ]
71 ++ lib.optionals stdenv.isDarwin [ libiconv CoreFoundation ];
75 for f in src/lt/configure src/cs/c/configure src/bc/src/string.c; do
76 substituteInPlace "$f" --replace /usr/bin/uname ${coreutils}/bin/uname
81 gappsWrapperArgs+=("--prefix" "LD_LIBRARY_PATH" ":" ${LD_LIBRARY_PATH})
84 shared = if stdenv.isDarwin then "dylib" else "shared";
85 configureFlags = [ "--enable-${shared}" "--enable-lt=${libtool}/bin/libtool" ]
86 ++ lib.optionals disableDocs [ "--disable-docs" ]
87 ++ lib.optionals stdenv.isDarwin [ "--enable-xonx" ];
89 configureScript = "../configure";
91 enableParallelBuilding = false;
95 description = "A programmable programming language";
97 Racket is a full-spectrum programming language. It goes beyond
98 Lisp and Scheme with dialects that support objects, types,
99 laziness, and more. Racket enables programmers to link
100 components written in different dialects, and it empowers
101 programmers to create new, project-specific dialects. Racket's
102 libraries support applications from web servers and databases to
105 homepage = "https://racket-lang.org/";
106 license = with licenses; [ asl20 /* or */ mit ];
107 maintainers = with maintainers; [ henrytill vrthra ];
108 platforms = [ "x86_64-darwin" "x86_64-linux" "aarch64-linux" ];
109 broken = stdenv.isDarwin; # No support yet for setting FFI lookup path