summary refs log tree commit diff
path: root/pkgs/applications/networking/sync/unison/default.nix
diff options
context:
space:
mode:
authorLluís Batlle i Rossell <viric@vicerveza.homeunix.net>2011-01-03 20:52:49 +0000
committerLluís Batlle i Rossell <viric@vicerveza.homeunix.net>2011-01-03 20:52:49 +0000
commit3aa2bdbab57d0b527490eade16b6db951c531784 (patch)
tree907db488b9777a929cbdd1d76e80e2683aba3db1 /pkgs/applications/networking/sync/unison/default.nix
parent45b8ce020f5c545d542324c95f4baa842fd4be0d (diff)
downloadnixpkgs-3aa2bdbab57d0b527490eade16b6db951c531784.tar
nixpkgs-3aa2bdbab57d0b527490eade16b6db951c531784.tar.gz
nixpkgs-3aa2bdbab57d0b527490eade16b6db951c531784.tar.bz2
nixpkgs-3aa2bdbab57d0b527490eade16b6db951c531784.tar.lz
nixpkgs-3aa2bdbab57d0b527490eade16b6db951c531784.tar.xz
nixpkgs-3aa2bdbab57d0b527490eade16b6db951c531784.tar.zst
nixpkgs-3aa2bdbab57d0b527490eade16b6db951c531784.zip
Making unison build to byte code in armv5tel. I also fix the build with enableX11 I think.
svn path=/nixpkgs/trunk/; revision=25373
Diffstat (limited to 'pkgs/applications/networking/sync/unison/default.nix')
-rw-r--r--pkgs/applications/networking/sync/unison/default.nix12
1 files changed, 9 insertions, 3 deletions
diff --git a/pkgs/applications/networking/sync/unison/default.nix b/pkgs/applications/networking/sync/unison/default.nix
index ba62c36980d..aa694a3908d 100644
--- a/pkgs/applications/networking/sync/unison/default.nix
+++ b/pkgs/applications/networking/sync/unison/default.nix
@@ -1,6 +1,9 @@
-{stdenv, fetchurl, ocaml, lablgtk, fontschumachermisc, xset, makeWrapper
+{stdenv, fetchurl, ocaml, lablgtk, fontschumachermisc, xset, makeWrapper, ncurses
 , enableX11 ? true}:
 
+let
+  nativeCode = if stdenv.system == "armv5tel-linux" then false else true;
+in
 stdenv.mkDerivation (rec {
 
   name = "unison-2.32.52";
@@ -9,13 +12,14 @@ stdenv.mkDerivation (rec {
     sha256 = "11844yh1gpjjapn8pvc14hla7g70spwqy6h61qk2is83mpafahhm";
   };
 
-  buildInputs = [ocaml makeWrapper];
+  buildInputs = [ ocaml makeWrapper ncurses ];
 
   preBuild = if enableX11 then ''
     sed -i "s|\(OCAMLOPT=.*\)$|\1 -I $(echo "${lablgtk}"/lib/ocaml/*/site-lib/lablgtk2)|" Makefile.OCaml
   '' else "";
 
-  makeFlags = "INSTALLDIR=$(out)/bin/" + (if enableX11 then "UISTYLE=gtk2" else "");
+  makeFlags = "INSTALLDIR=$(out)/bin/" + (if enableX11 then " UISTYLE=gtk2" else "")
+    + (if ! nativeCode then " NATIVE=false" else "");
 
   preInstall = "ensureDir $out/bin";
 
@@ -26,6 +30,8 @@ stdenv.mkDerivation (rec {
     done
   '' else "";
 
+  dontStrip = if ! nativeCode then true else false;
+
   meta = {
     homepage = http://www.cis.upenn.edu/~bcpierce/unison/;
     description = "Bidirectional file synchronizer";