2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, gcc }:
|
2021-01-09 10:05:03 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "cakelisp";
|
|
|
|
version = "0.1.0";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "makuto";
|
|
|
|
repo = "cakelisp";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "126va59jy7rvy6c2wrf8j44m307f2d8jixqkc49s9wllxprj1dmg";
|
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ gcc ];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace runtime/HotReloading.cake \
|
|
|
|
--replace '"/usr/bin/g++"' '"${gcc}/bin/g++"'
|
|
|
|
substituteInPlace src/ModuleManager.cpp \
|
|
|
|
--replace '"/usr/bin/g++"' '"${gcc}/bin/g++"'
|
2021-02-05 17:12:51 +00:00
|
|
|
'' + lib.optionalString stdenv.isDarwin ''
|
2021-01-09 10:05:03 +00:00
|
|
|
substituteInPlace Build.sh --replace '--export-dynamic' '-export_dynamic'
|
|
|
|
substituteInPlace runtime/HotReloading.cake --replace '--export-dynamic' '-export_dynamic'
|
|
|
|
substituteInPlace Bootstrap.cake --replace '--export-dynamic' '-export_dynamic'
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
./Build.sh
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
install -Dm755 bin/cakelisp -t $out/bin
|
|
|
|
'';
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2021-01-09 10:05:03 +00:00
|
|
|
description = "A performance-oriented Lisp-like language";
|
|
|
|
homepage = "https://github.com/makuto/cakelisp";
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
platforms = platforms.darwin ++ platforms.linux;
|
|
|
|
maintainers = [ maintainers.sbond75 ];
|
2022-12-17 10:02:37 +00:00
|
|
|
# never built on aarch64-darwin since first introduction in nixpkgs
|
|
|
|
broken = stdenv.isDarwin && stdenv.isAarch64;
|
2021-01-09 10:05:03 +00:00
|
|
|
};
|
|
|
|
}
|