summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorLluís Batlle i Rossell <viric@viric.name>2012-07-27 20:37:08 +0200
committerLluís Batlle i Rossell <viric@viric.name>2012-07-27 22:43:40 +0200
commitc0832627c4f344376cd7a45945d1f4f7bb1210cd (patch)
tree3d1fed88901d5dbf5148d911fad2ff9183b8267d /pkgs
parent32b48d64dc9a146185d53dc0ec563f6946333a61 (diff)
downloadnixpkgs-c0832627c4f344376cd7a45945d1f4f7bb1210cd.tar
nixpkgs-c0832627c4f344376cd7a45945d1f4f7bb1210cd.tar.gz
nixpkgs-c0832627c4f344376cd7a45945d1f4f7bb1210cd.tar.bz2
nixpkgs-c0832627c4f344376cd7a45945d1f4f7bb1210cd.tar.lz
nixpkgs-c0832627c4f344376cd7a45945d1f4f7bb1210cd.tar.xz
nixpkgs-c0832627c4f344376cd7a45945d1f4f7bb1210cd.tar.zst
nixpkgs-c0832627c4f344376cd7a45945d1f4f7bb1210cd.zip
ocaml, unison: make them build on mips (native compilers)
I switch off the build of ocaml compilers to native code, and add
a 'passthru' that unison can use to see if it needs to call the native
or the bytecode compiler.
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/applications/networking/sync/unison/default.nix7
-rw-r--r--pkgs/development/compilers/ocaml/3.12.1.nix8
2 files changed, 8 insertions, 7 deletions
diff --git a/pkgs/applications/networking/sync/unison/default.nix b/pkgs/applications/networking/sync/unison/default.nix
index b6906c86afe..ea30903fb38 100644
--- a/pkgs/applications/networking/sync/unison/default.nix
+++ b/pkgs/applications/networking/sync/unison/default.nix
@@ -1,9 +1,6 @@
 {stdenv, fetchurl, ocaml, lablgtk, fontschumachermisc, xset, makeWrapper, ncurses
 , enableX11 ? true}:
 
-let
-  nativeCode = if stdenv.isArm then false else true;
-in
 stdenv.mkDerivation (rec {
 
   name = "unison-2.40.63";
@@ -19,7 +16,7 @@ stdenv.mkDerivation (rec {
   '' else "";
 
   makeFlags = "INSTALLDIR=$(out)/bin/" + (if enableX11 then " UISTYLE=gtk2" else "")
-    + (if ! nativeCode then " NATIVE=false" else "");
+    + (if ! ocaml.nativeCompilers then " NATIVE=false" else "");
 
   preInstall = "mkdir -p $out/bin";
 
@@ -30,7 +27,7 @@ stdenv.mkDerivation (rec {
     done
   '' else "";
 
-  dontStrip = if ! nativeCode then true else false;
+  dontStrip = if ! ocaml.nativeCompilers then true else false;
 
   meta = {
     homepage = http://www.cis.upenn.edu/~bcpierce/unison/;
diff --git a/pkgs/development/compilers/ocaml/3.12.1.nix b/pkgs/development/compilers/ocaml/3.12.1.nix
index 66075d4a966..a70ba649d1f 100644
--- a/pkgs/development/compilers/ocaml/3.12.1.nix
+++ b/pkgs/development/compilers/ocaml/3.12.1.nix
@@ -1,8 +1,8 @@
 { stdenv, fetchurl, ncurses, x11 }:
 
 let
-   useX11 = !stdenv.isArm;
-   useNativeCompilers = !stdenv.isArm;
+   useX11 = !stdenv.isArm && !stdenv.isMips;
+   useNativeCompilers = !stdenv.isArm && !stdenv.isMips;
    inherit (stdenv.lib) optionals optionalString;
 in
 
@@ -30,6 +30,10 @@ stdenv.mkDerivation rec {
     ln -sv $out/lib/ocaml/caml $out/include/caml
   '';
 
+  passthru = {
+    nativeCompilers = useNativeCompilers;
+  };
+
   meta = {
     homepage = http://caml.inria.fr/ocaml;
     licenses = [ "QPL" /* compiler */ "LGPLv2" /* library */ ];