diff options
author | Lluís Batlle i Rossell <viric@vicerveza.homeunix.net> | 2011-01-03 18:43:16 +0000 |
---|---|---|
committer | Lluís Batlle i Rossell <viric@vicerveza.homeunix.net> | 2011-01-03 18:43:16 +0000 |
commit | ed9a70e40e347cd97fe3810ff6cfa9dd5d3382d8 (patch) | |
tree | 7200ac7ff9671ea7ba15d22e4fddfad34a6ab36f /pkgs/applications/networking/sync | |
parent | 9b50ebd825fe85c6cc20217b0740d8b7ed780d6a (diff) |
Allowing unison without X.
svn path=/nixpkgs/trunk/; revision=25369
Diffstat (limited to 'pkgs/applications/networking/sync')
-rw-r--r-- | pkgs/applications/networking/sync/unison/default.nix | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/pkgs/applications/networking/sync/unison/default.nix b/pkgs/applications/networking/sync/unison/default.nix index 6b00500b66239..ba62c36980d51 100644 --- a/pkgs/applications/networking/sync/unison/default.nix +++ b/pkgs/applications/networking/sync/unison/default.nix @@ -1,4 +1,5 @@ -{stdenv, fetchurl, ocaml, lablgtk, fontschumachermisc, xset, makeWrapper}: +{stdenv, fetchurl, ocaml, lablgtk, fontschumachermisc, xset, makeWrapper +, enableX11 ? true}: stdenv.mkDerivation (rec { @@ -10,17 +11,20 @@ stdenv.mkDerivation (rec { buildInputs = [ocaml makeWrapper]; - preBuild = '' + preBuild = if enableX11 then '' sed -i "s|\(OCAMLOPT=.*\)$|\1 -I $(echo "${lablgtk}"/lib/ocaml/*/site-lib/lablgtk2)|" Makefile.OCaml - ''; - makeFlags = "UISTYLE=gtk2 INSTALLDIR=$(out)/bin/"; + '' else ""; + + makeFlags = "INSTALLDIR=$(out)/bin/" + (if enableX11 then "UISTYLE=gtk2" else ""); + preInstall = "ensureDir $out/bin"; - postInstall = '' + + postInstall = if enableX11 then '' for i in $(cd $out/bin && ls); do wrapProgram $out/bin/$i \ --run "[ -n \"\$DISPLAY\" ] && (${xset}/bin/xset q | grep -q \"${fontschumachermisc}\" || ${xset}/bin/xset +fp \"${fontschumachermisc}/lib/X11/fonts/misc\")" done - ''; + '' else ""; meta = { homepage = http://www.cis.upenn.edu/~bcpierce/unison/; |