about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLucas Ransan <lucas@ransan.tk>2021-06-25 17:19:23 +0200
committerLucas Ransan <lucas@ransan.tk>2021-06-25 17:33:55 +0200
commitf9d39423e73074516c36ecf54f0cb85517f485a0 (patch)
tree0d6632891b2c253f7d197cbc7b26996846046f7e
parent370a10c27fc13f2b70dfee2284b30d6989b4336b (diff)
myrddin: init at 0.3.1
-rw-r--r--pkgs/development/compilers/myrddin/default.nix57
-rw-r--r--pkgs/top-level/all-packages.nix2
2 files changed, 59 insertions, 0 deletions
diff --git a/pkgs/development/compilers/myrddin/default.nix b/pkgs/development/compilers/myrddin/default.nix
new file mode 100644
index 0000000000000..3120426210bfa
--- /dev/null
+++ b/pkgs/development/compilers/myrddin/default.nix
@@ -0,0 +1,57 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, pkg-config
+, bison
+, binutils
+, binutils-unwrapped
+, makeWrapper
+}:
+
+stdenv.mkDerivation rec {
+  pname = "myrddin";
+  version = "0.3.1";
+
+  src = fetchFromGitHub {
+    repo = "mc";
+    owner = "oridb";
+    rev = "r${version}";
+    sha256 = "7ImjiG/rIKGPHq3Vh/mftY7pqw/vfOxD3LJeT87HmCk=";
+  };
+
+  nativeBuildInputs = [
+    bison
+    pkg-config
+    makeWrapper
+  ];
+
+  postPatch = ''
+    substituteInPlace mk/c.mk \
+        --replace "-Werror" ""
+  '';
+
+  buildPhase = ''
+    make bootstrap
+    make
+  '';
+
+  postInstall = ''
+    for b in $out/bin/*; do
+        wrapProgram $b --prefix PATH : $out/bin:${lib.makeBinPath [ binutils ]}
+    done
+  '';
+
+  checkPhase = ''
+    make check
+  '';
+
+  doCheck = true;
+
+  meta = with lib; {
+    description = "Systems language that is both powerful and fun to use";
+    homepage = "https://myrlang.org/";
+    license = licenses.mit;
+    maintainers = with maintainers; [ luc65r ];
+    platforms = platforms.all;
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index a005df9e60b46..911f53984acab 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -22285,6 +22285,8 @@ in
 
   mustache-hpp = callPackage ../development/libraries/mustache-hpp { };
 
+  myrddin = callPackage ../development/compilers/myrddin { };
+
   myrica = callPackage ../data/fonts/myrica { };
 
   nafees = callPackage ../data/fonts/nafees { };