ref: a28464d95d9797aa15925dac3ca7a890b9835b5a
parent: 729c781f94e803b242c923001798f90f0250e2e3
author: Ori Bernstein <ori@eigenstate.org>
date: Sat May 12 02:32:31 EDT 2018
Move nix packaging to the appropriate place.
--- /dev/null
+++ b/support/pkg/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"'
+ '';
+}