1 { lib, stdenv, fetchFromGitHub, makeWrapper }:
3 stdenv.mkDerivation rec {
5 pname = "chibi-scheme";
7 src = fetchFromGitHub {
11 sha256 = "sha256-i+xiaYwM7a+0T824VSuh7UUNI6HV9KpqzQPE1WAZ+As=";
14 nativeBuildInputs = [ makeWrapper ];
17 make install PREFIX="$out"
21 wrapProgram "$out/bin/chibi-scheme" \
22 --prefix CHIBI_MODULE_PATH : "$out/share/chibi:$out/lib/chibi" \
23 ${lib.optionalString stdenv.hostPlatform.isDarwin "--prefix DYLD_LIBRARY_PATH : $out/lib"}
25 for f in chibi-doc chibi-ffi snow-chibi; do
26 substituteInPlace "$out/bin/$f" \
27 --replace "/usr/bin/env chibi-scheme" "$out/bin/chibi-scheme"
32 homepage = "https://github.com/ashinn/chibi-scheme";
33 description = "Small Footprint Scheme for use as a C Extension Language";
34 platforms = lib.platforms.all;
35 license = lib.licenses.bsd3;
36 maintainers = [ lib.maintainers.DerGuteMoritz ];