1 { lib, stdenv, fetchurl
4 , ncurses, libiconv, libX11, libuuid, testers
7 stdenv.mkDerivation (finalAttrs: {
12 url = "https://github.com/cisco/ChezScheme/releases/download/v${finalAttrs.version}/csv${finalAttrs.version}.tar.gz";
13 hash = "sha256-03GZASte0ZhcQGnWqH/xjl4fWi3yfkApkfr0XcTyIyw=";
16 nativeBuildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
18 ] ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [
19 darwin.autoSignDarwinBinariesHook
21 buildInputs = [ ncurses libiconv libX11 libuuid ];
23 enableParallelBuilding = true;
25 env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isGNU "-Wno-error=format-truncation";
28 ** We have to fix a few occurrences to tools with absolute
29 ** paths in some helper scripts, otherwise the build will fail on
30 ** NixOS or in any chroot build.
33 substituteInPlace ./makefiles/installsh \
34 --replace-warn "/usr/bin/true" "${coreutils}/bin/true"
36 substituteInPlace zlib/configure \
37 --replace-warn "/usr/bin/libtool" libtool
41 ** Don't use configureFlags, since that just implicitly appends
42 ** everything onto a --prefix flag, which ./configure gets very angry
45 ** Also, carefully set a manual workarea argument, so that we
46 ** can later easily find the machine type that we built Chez
50 ./configure --as-is --threads --installprefix=$out --installman=$out/share/man
54 ** Clean up some of the examples from the build output.
57 rm -rf $out/lib/csv${finalAttrs.version}/examples
60 setupHook = ./setup-hook.sh;
63 version = testers.testVersion {
64 package = finalAttrs.finalPackage;
69 description = "Powerful and incredibly fast R6RS Scheme compiler";
70 homepage = "https://cisco.github.io/ChezScheme/";
71 license = lib.licenses.asl20;
72 maintainers = with lib.maintainers; [ thoughtpolice ];
73 platforms = lib.platforms.unix;
74 mainProgram = "scheme";