nixpkgs/pkgs/development/compilers/cakelisp/default.nix
Rick van Schijndel 9833d56c24 treewide: mark packages broken that never built on PLATFORM
Done with the help of https://github.com/Mindavi/nixpkgs-mark-broken
Tool is still WIP but this is one of the first results.

I manually audited the results and removed some results that were not valid.

Note that some of these packages maybe should have more constrained platforms set
instead of broken set, but I think not being perfectly correct is better than
just keep trying to build all these things and never succeeding.

Some observations:

- Some darwin builds require XCode tools
- aarch64-linux builds sometimes suffer from using gcc9
  - gcc9 is getting older and misses some new libraries/features
- Sometimes tools try to do system detection or expect some explicit settings for
  platforms that are not x86_64-linux
2022-12-13 21:40:12 +01:00

45 lines
1.3 KiB
Nix

{ lib, stdenv, fetchFromGitHub, gcc }:
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++"'
'' + lib.optionalString stdenv.isDarwin ''
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
'';
meta = with lib; {
description = "A performance-oriented Lisp-like language";
homepage = "https://github.com/makuto/cakelisp";
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;
};
}