Make x11 optionnal for ocaml

This commit is contained in:
Florent Becker 2014-07-21 11:27:09 +02:00
parent 29d5629074
commit c59819311c

View File

@ -1,9 +1,12 @@
{ stdenv, fetchurl, ncurses, buildEnv, libX11, xproto }:
{ stdenv, fetchurl, ncurses, buildEnv, libX11, xproto,
useX11 ? (!stdenv.isArm && !stdenv.isMips) }:
let
useX11 = !stdenv.isArm && !stdenv.isMips;
useNativeCompilers = !stdenv.isMips;
inherit (stdenv.lib) optionals optionalString;
x11Ok = if useX11 && (!stdenv.isArm && !stdenv.isMips)
then throw "x11 not available in ocaml with arm or mips arch"
else true;
in
stdenv.mkDerivation rec {