2019-11-27 15:32:48 +01:00
|
|
|
{ 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
|
2021-03-03 12:48:05 +01:00
|
|
|
${stdenv.cc.targetPrefix}cc -o $out/bin/mu-unwrapped bootstrap/mu64.c
|
2019-11-27 15:32:48 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
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;
|
2020-11-28 05:50:21 +01:00
|
|
|
maintainers = with maintainers; [ Br1ght0ne ];
|
2021-03-03 12:48:05 +01:00
|
|
|
platforms = platforms.all;
|
2019-11-27 15:32:48 +01:00
|
|
|
};
|
|
|
|
}
|