1 { lib, stdenv, fetchgit, gcc, unstableGitUpdater }:
5 # using unstable as it's the only version that builds against gcc-13
6 version = "0.3.0-unstable-2024-04-25";
9 url = "https://macoy.me/code/macoy/cakelisp";
10 rev = "eb4427f555c3def9d65612672ccfe59e11b14059";
11 hash = "sha256-wFyqAbHrBMFKqMYlBjS6flYHPn3Rxtaiqb1rRmlZrB4=";
14 buildInputs = [ gcc ];
17 substituteInPlace runtime/HotReloading.cake \
18 --replace '"/usr/bin/g++"' '"${gcc}/bin/g++"'
19 substituteInPlace src/ModuleManager.cpp \
20 --replace '"/usr/bin/g++"' '"${gcc}/bin/g++"'
21 '' + lib.optionalString stdenv.hostPlatform.isDarwin ''
22 substituteInPlace Build.sh --replace '--export-dynamic' '-export_dynamic'
23 substituteInPlace runtime/HotReloading.cake --replace '--export-dynamic' '-export_dynamic'
24 substituteInPlace Bootstrap.cake --replace '--export-dynamic' '-export_dynamic'
33 env.NIX_CFLAGS_COMPILE = "-Wno-error=format";
37 install -Dm755 bin/cakelisp -t $out/bin
41 passthru.updateScript = unstableGitUpdater {
42 url = "https://macoy.me/code/macoy/cakelisp";
46 description = "Performance-oriented Lisp-like language";
47 mainProgram = "cakelisp";
48 homepage = "https://macoy.me/code/macoy/cakelisp";
49 license = licenses.gpl3Plus;
50 platforms = platforms.darwin ++ platforms.linux;
51 maintainers = [ maintainers.sbond75 ];
52 # never built on aarch64-darwin since first introduction in nixpkgs
53 broken = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64;