shithub: mc

Download patch

ref: 729c781f94e803b242c923001798f90f0250e2e3
parent: 5e304164f4acfdd78208838a64185f833a7d48db
author: Adrian Parvin D. Ouano <[email protected]>
date: Fri May 11 10:49:37 EDT 2018

Add default.nix for Nix systems

--- /dev/null
+++ b/default.nix
@@ -1,0 +1,25 @@
+{ pkgs ? (import <nixpkgs> {})
+, stdenv ? pkgs.stdenv
+, bison ? pkgs.bison
+, binutils ? pkgs.binutils
+, fetchurl ? pkgs.fetchurl
+}:
+
+stdenv.mkDerivation rec {
+  name = "myrddin";
+
+  src = ./.;
+
+  buildInputs = [ bison binutils ];
+
+  preBuild = ''
+    make bootstrap
+  '';
+
+  postPatch = ''
+    substituteInPlace "mbld/opts.myr" --replace '"ld"' '"${binutils}/bin/ld"'
+    substituteInPlace "configure"     --replace '"ld"' '"${binutils}/bin/ld"'
+    substituteInPlace "mbld/opts.myr" --replace '"as"' '"${binutils}/bin/as"'
+    substituteInPlace "configure"     --replace '"as"' '"${binutils}/bin/as"'
+  '';
+}