about summary refs log tree commit diff
path: root/pkgs/development/compilers/muonlang
diff options
context:
space:
mode:
authorAndersonTorres <torres.anderson.85@protonmail.com>2022-04-12 00:56:28 -0300
committerAndersonTorres <torres.anderson.85@protonmail.com>2022-04-12 22:38:36 -0300
commit9801fb6c1a0ae7e325443ff2fb0c61700865fbf3 (patch)
tree063235d9556310105bdc721fce45c08dbc7a0f79 /pkgs/development/compilers/muonlang
parent85e5fc4989132ce225c98e44d209edb081d8aecf (diff)
move muon to muonlang
In order to avoid clashing the (future) muon (a meson replacement).
Diffstat (limited to 'pkgs/development/compilers/muonlang')
-rw-r--r--pkgs/development/compilers/muonlang/default.nix34
1 files changed, 34 insertions, 0 deletions
diff --git a/pkgs/development/compilers/muonlang/default.nix b/pkgs/development/compilers/muonlang/default.nix
new file mode 100644
index 0000000000000..aef02bca970de
--- /dev/null
+++ b/pkgs/development/compilers/muonlang/default.nix
@@ -0,0 +1,34 @@
+{ stdenv, lib, fetchFromGitHub, makeWrapper }:
+
+stdenv.mkDerivation rec {
+  pname = "muon";
+  version = "2019-11-27";
+
+  src = fetchFromGitHub {
+    owner = "nickmqb";
+    repo = pname;
+    rev = "6d3a5054ae75b0e5a0ae633cf8cbc3e2a054f8b3";
+    sha256 = "1sb1i08421jxlx791g8nh4l239syaj730hagkzc159g0z65614zz";
+  };
+
+  nativeBuildInputs = [ makeWrapper ];
+
+  buildPhase = ''
+    mkdir -p $out/bin $out/share/mu
+    cp -r lib $out/share/mu
+    ${stdenv.cc.targetPrefix}cc -o $out/bin/mu-unwrapped bootstrap/mu64.c
+  '';
+
+  installPhase = ''
+    makeWrapper $out/bin/mu-unwrapped $out/bin/mu \
+      --add-flags $out/share/mu/lib/core.mu
+  '';
+
+  meta = with lib; {
+    description = "Modern low-level programming language";
+    homepage = "https://github.com/nickmqb/muon";
+    license = licenses.mit;
+    maintainers = with maintainers; [ Br1ght0ne ];
+    platforms = platforms.all;
+  };
+}