summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2018-05-12 06:32:31 +0000
committerSystem administrator <root@ip-172-31-43-29.ap-northeast-1.compute.internal>2018-05-12 06:33:08 +0000
commita28464d95d9797aa15925dac3ca7a890b9835b5a (patch)
tree5e2c7a222fc24287145df7b6c6c97c005c821e13
parent729c781f94e803b242c923001798f90f0250e2e3 (diff)
downloadmc-a28464d95d9797aa15925dac3ca7a890b9835b5a.tar.gz
Move nix packaging to the appropriate place.
-rw-r--r--support/pkg/default.nix25
1 files changed, 25 insertions, 0 deletions
diff --git a/support/pkg/default.nix b/support/pkg/default.nix
new file mode 100644
index 0000000..5c20176
--- /dev/null
+++ b/support/pkg/default.nix
@@ -0,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"'
+ '';
+}