pkgs/development/compilers: stdenv.lib -> lib
This commit is contained in:
@@ -6,17 +6,17 @@ let
|
||||
safeX11 = stdenv: !(stdenv.isAarch32 || stdenv.isMips);
|
||||
in
|
||||
|
||||
{ stdenv, fetchurl, ncurses, buildEnv, libunwind
|
||||
, libX11, xorgproto, useX11 ? safeX11 stdenv && !stdenv.lib.versionAtLeast version "4.09"
|
||||
{ lib, stdenv, fetchurl, ncurses, buildEnv, libunwind
|
||||
, libX11, xorgproto, useX11 ? safeX11 stdenv && !lib.versionAtLeast version "4.09"
|
||||
, aflSupport ? false
|
||||
, flambdaSupport ? false
|
||||
, spaceTimeSupport ? false
|
||||
}:
|
||||
|
||||
assert useX11 -> !stdenv.isAarch32 && !stdenv.isMips;
|
||||
assert aflSupport -> stdenv.lib.versionAtLeast version "4.05";
|
||||
assert flambdaSupport -> stdenv.lib.versionAtLeast version "4.03";
|
||||
assert spaceTimeSupport -> stdenv.lib.versionAtLeast version "4.04";
|
||||
assert aflSupport -> lib.versionAtLeast version "4.05";
|
||||
assert flambdaSupport -> lib.versionAtLeast version "4.03";
|
||||
assert spaceTimeSupport -> lib.versionAtLeast version "4.04";
|
||||
|
||||
let
|
||||
src = args.src or (fetchurl {
|
||||
@@ -27,7 +27,7 @@ in
|
||||
|
||||
let
|
||||
useNativeCompilers = !stdenv.isMips;
|
||||
inherit (stdenv.lib) optional optionals optionalString;
|
||||
inherit (lib) optional optionals optionalString;
|
||||
name = "ocaml${optionalString aflSupport "+afl"}${optionalString spaceTimeSupport "+spacetime"}${optionalString flambdaSupport "+flambda"}-${version}";
|
||||
in
|
||||
|
||||
@@ -47,7 +47,7 @@ stdenv.mkDerivation (args // {
|
||||
prefixKey = "-prefix ";
|
||||
configureFlags =
|
||||
let flags = new: old:
|
||||
if stdenv.lib.versionAtLeast version "4.08"
|
||||
if lib.versionAtLeast version "4.08"
|
||||
then new else old
|
||||
; in
|
||||
optionals useX11 (flags
|
||||
@@ -59,11 +59,11 @@ stdenv.mkDerivation (args // {
|
||||
;
|
||||
|
||||
buildFlags = [ "world" ] ++ optionals useNativeCompilers [ "bootstrap" "world.opt" ];
|
||||
buildInputs = optional (!stdenv.lib.versionAtLeast version "4.07") ncurses
|
||||
buildInputs = optional (!lib.versionAtLeast version "4.07") ncurses
|
||||
++ optionals useX11 [ libX11 xorgproto ];
|
||||
propagatedBuildInputs = optional spaceTimeSupport libunwind;
|
||||
installTargets = [ "install" ] ++ optional useNativeCompilers "installopt";
|
||||
preConfigure = optionalString (!stdenv.lib.versionAtLeast version "4.04") ''
|
||||
preConfigure = optionalString (!lib.versionAtLeast version "4.04") ''
|
||||
CAT=$(type -tp cat)
|
||||
sed -e "s@/bin/cat@$CAT@" -i config/auto-aux/sharpbang
|
||||
'';
|
||||
@@ -76,7 +76,7 @@ stdenv.mkDerivation (args // {
|
||||
nativeCompilers = useNativeCompilers;
|
||||
};
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
homepage = "http://caml.inria.fr/ocaml";
|
||||
branch = versionNoPatch;
|
||||
license = with licenses; [
|
||||
@@ -105,7 +105,7 @@ stdenv.mkDerivation (args // {
|
||||
'';
|
||||
|
||||
platforms = with platforms; linux ++ darwin;
|
||||
broken = stdenv.isAarch64 && !stdenv.lib.versionAtLeast version "4.06";
|
||||
broken = stdenv.isAarch64 && !lib.versionAtLeast version "4.06";
|
||||
};
|
||||
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user