nixpkgs/pkgs/development/compilers/cakelisp/default.nix

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

48 lines
1.4 KiB
Nix
Raw Normal View History

2023-05-15 20:00:00 +00:00
{ lib, stdenv, fetchgit, gcc }:
2020-12-23 04:07:35 +00:00
stdenv.mkDerivation rec {
pname = "cakelisp";
version = "0.1.0";
2023-05-15 20:00:00 +00:00
src = fetchgit {
url = "https://macoy.me/code/macoy/cakelisp";
2020-12-23 04:07:35 +00:00
rev = "v${version}";
2023-05-15 20:00:00 +00:00
sha256 = "sha256-r7Yg8+2U8qQTYRP3KFET7oBRCZHIZS6Y8TsfL1NR24g=";
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.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
'';
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
'';
meta = with lib; {
2020-12-23 04:07:35 +00:00
description = "A performance-oriented Lisp-like language";
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.isDarwin && stdenv.isAarch64;
2020-12-23 04:07:35 +00:00
};
}