nixpkgs/pkgs/by-name/ca/cakelisp/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

56 lines
1.7 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchgit, gcc, unstableGitUpdater }:
2020-12-23 04:07:35 +00:00
stdenv.mkDerivation {
2020-12-23 04:07:35 +00:00
pname = "cakelisp";
# using unstable as it's the only version that builds against gcc-13
version = "0.3.0-unstable-2024-04-25";
2020-12-23 04:07:35 +00:00
2023-05-15 20:00:00 +00:00
src = fetchgit {
url = "https://macoy.me/code/macoy/cakelisp";
rev = "eb4427f555c3def9d65612672ccfe59e11b14059";
hash = "sha256-wFyqAbHrBMFKqMYlBjS6flYHPn3Rxtaiqb1rRmlZrB4=";
2020-12-23 04:07:35 +00:00
};
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++"'
'' + lib.optionalString stdenv.hostPlatform.isDarwin ''
2020-12-23 04:07:35 +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 = ''
2023-05-15 20:00:00 +00:00
runHook preBuild
2020-12-23 04:07:35 +00:00
./Build.sh
2023-05-15 20:00:00 +00:00
runHook postBuild
2020-12-23 04:07:35 +00:00
'';
env.NIX_CFLAGS_COMPILE = "-Wno-error=format";
2020-12-23 04:07:35 +00:00
installPhase = ''
2023-05-15 20:00:00 +00:00
runHook preInstall
2020-12-23 04:07:35 +00:00
install -Dm755 bin/cakelisp -t $out/bin
2023-05-15 20:00:00 +00:00
runHook postInstall
2020-12-23 04:07:35 +00:00
'';
passthru.updateScript = unstableGitUpdater {
url = "https://macoy.me/code/macoy/cakelisp";
};
meta = with lib; {
2020-12-23 04:07:35 +00:00
description = "Performance-oriented Lisp-like language";
mainProgram = "cakelisp";
2023-05-15 20:00:00 +00:00
homepage = "https://macoy.me/code/macoy/cakelisp";
2020-12-23 04:07:35 +00:00
license = licenses.gpl3Plus;
platforms = platforms.darwin ++ platforms.linux;
maintainers = [ maintainers.sbond75 ];
# never built on aarch64-darwin since first introduction in nixpkgs
broken = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64;
2020-12-23 04:07:35 +00:00
};
}