1 { stdenv, lib, fetchurl, ncurses, buildPackages }:
4 isCrossCompiling = stdenv.hostPlatform != stdenv.buildPlatform;
7 stdenv.mkDerivation rec {
12 url = "https://www.t3x.org/s9fes/s9fes-${version}.tgz";
13 sha256 = "sha256-Lp/akaDy3q4FmIE6x0fj9ae/SOD7tdsmzy2xdcCh13o=";
16 # Fix cross-compilation
18 substituteInPlace Makefile \
19 --replace 'ar q' '${stdenv.cc.targetPrefix}ar q' \
20 --replace 'strip' '${stdenv.cc.targetPrefix}strip'
21 ${lib.optionalString isCrossCompiling "substituteInPlace Makefile --replace ./s9 '${buildPackages.s9fes}/bin/s9'"}
24 buildInputs = [ ncurses ];
25 makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" "PREFIX=$(out)" ];
26 enableParallelBuilding = true;
29 description = "Scheme 9 From Empty Space, an interpreter for R4RS Scheme";
30 homepage = "http://www.t3x.org/s9fes/index.html";
31 license = licenses.publicDomain;
32 maintainers = with maintainers; [ siraben ];
33 platforms = platforms.unix;