From c59819311c6e15d6c807fcfb294e9b3600a79407 Mon Sep 17 00:00:00 2001 From: Florent Becker Date: Mon, 21 Jul 2014 11:27:09 +0200 Subject: [PATCH] =?UTF-8?q?Make=20x11=C2=A0optionnal=20for=20ocaml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/development/compilers/ocaml/4.01.0.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkgs/development/compilers/ocaml/4.01.0.nix b/pkgs/development/compilers/ocaml/4.01.0.nix index 48966fc2866..0f8ed7deaa4 100644 --- a/pkgs/development/compilers/ocaml/4.01.0.nix +++ b/pkgs/development/compilers/ocaml/4.01.0.nix @@ -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 {