summary refs log tree commit diff
path: root/pkgs/development/compilers/cakelisp
diff options
context:
space:
mode:
authorsbond75 <43617712+sbond75@users.noreply.github.com>2020-12-22 23:07:35 -0500
committersbond75 <43617712+sbond75@users.noreply.github.com>2021-01-04 22:28:11 -0500
commit805788f40a63e65ea8e304a8965a0aba7bcc5a64 (patch)
tree43989cd2cc7e1fc2453fdd678a0013dedbcfd0ed /pkgs/development/compilers/cakelisp
parent2ada4729645359ad7571c1927231bead70dadb32 (diff)
downloadnixpkgs-805788f40a63e65ea8e304a8965a0aba7bcc5a64.tar
nixpkgs-805788f40a63e65ea8e304a8965a0aba7bcc5a64.tar.gz
nixpkgs-805788f40a63e65ea8e304a8965a0aba7bcc5a64.tar.bz2
nixpkgs-805788f40a63e65ea8e304a8965a0aba7bcc5a64.tar.lz
nixpkgs-805788f40a63e65ea8e304a8965a0aba7bcc5a64.tar.xz
nixpkgs-805788f40a63e65ea8e304a8965a0aba7bcc5a64.tar.zst
nixpkgs-805788f40a63e65ea8e304a8965a0aba7bcc5a64.zip
cakelisp: init at 0.1.0
Diffstat (limited to 'pkgs/development/compilers/cakelisp')
-rw-r--r--pkgs/development/compilers/cakelisp/default.nix42
1 files changed, 42 insertions, 0 deletions
diff --git a/pkgs/development/compilers/cakelisp/default.nix b/pkgs/development/compilers/cakelisp/default.nix
new file mode 100644
index 00000000000..500c15a2aaa
--- /dev/null
+++ b/pkgs/development/compilers/cakelisp/default.nix
@@ -0,0 +1,42 @@
+{ 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++"'
+  '' + stdenv.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 stdenv.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 ];
+  };
+}