diff --git a/pkgs/development/compilers/ocaml/ocaml-3.08.0.nix b/pkgs/development/compilers/ocaml/3.08.0.nix similarity index 94% rename from pkgs/development/compilers/ocaml/ocaml-3.08.0.nix rename to pkgs/development/compilers/ocaml/3.08.0.nix index d063fead4a5..6d4b4ca616c 100644 --- a/pkgs/development/compilers/ocaml/ocaml-3.08.0.nix +++ b/pkgs/development/compilers/ocaml/3.08.0.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl, x11}: +args: with args; stdenv.mkDerivation { name = "ocaml-3.08.0"; diff --git a/pkgs/development/compilers/ocaml/ocaml-3.09.1.nix b/pkgs/development/compilers/ocaml/3.09.1.nix similarity index 92% rename from pkgs/development/compilers/ocaml/ocaml-3.09.1.nix rename to pkgs/development/compilers/ocaml/3.09.1.nix index 996012d6b27..6e9922ccc36 100644 --- a/pkgs/development/compilers/ocaml/ocaml-3.09.1.nix +++ b/pkgs/development/compilers/ocaml/3.09.1.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl, x11, ncurses}: +args: with args; stdenv.mkDerivation { name = "ocaml-3.09.1"; diff --git a/pkgs/development/compilers/ocaml/3.10.0.nix b/pkgs/development/compilers/ocaml/3.10.0.nix new file mode 100644 index 00000000000..458a7c68270 --- /dev/null +++ b/pkgs/development/compilers/ocaml/3.10.0.nix @@ -0,0 +1,23 @@ +args: with args; +stdenv.mkDerivation rec { + name = "ocaml-3.10.0"; + src = fetchurl { + url = http://caml.inria.fr/pub/distrib/ocaml-3.10/${name}.tar.bz2; + sha256 = "1ihmx1civ78s7k2hfc05z1s9vbyx2qw7fg8lnbxnfd6zxkk8878d"; + }; + prefixKey = "-prefix "; + configureFlags = ["-no-tk" "-x11lib" x11]; + buildFlags = "world bootstrap world.opt"; + buildInputs = [x11 ncurses]; + installTargets = "install installopt"; + patchPhase = " + CAT=$(type -tp cat) + sed -e \"s@/bin/cat@\${CAT}@\" -i config/auto-aux/sharpbang + "; + + meta = { + homepage = http://caml.inria.fr/ocaml; + license = "QPL, LGPL2 (library part)"; + desctiption = "Most popular variant of the Caml language"; + }; +} diff --git a/pkgs/development/compilers/ocaml/default.nix b/pkgs/development/compilers/ocaml/default.nix index 44603f95764..74d1378968c 100644 --- a/pkgs/development/compilers/ocaml/default.nix +++ b/pkgs/development/compilers/ocaml/default.nix @@ -1 +1,7 @@ -import ./ocaml-3.09.1.nix +args: +rec { + default = v_3_09_1; + v_3_08_0 = import ./3.08.0.nix (args // {stdenv = args.stdenv34;}); + v_3_09_1 = import ./3.09.1.nix args; + v_3_10_0 = import ./3.10.0.nix (args // {stdenv = args.stdenvUsingSetupNew2;}); +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a535f58a553..9b3ac7c8734 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1075,13 +1075,11 @@ rec { inherit fetchurl stdenv; }; - ocaml = import ../development/compilers/ocaml { - inherit fetchurl stdenv x11 ncurses; - }; + ocaml = getVersion "ocaml" ocaml_alts; - ocaml3080 = import ../development/compilers/ocaml/ocaml-3.08.0.nix { - inherit fetchurl x11; - stdenv = overrideGCC stdenv gcc34; + ocaml_alts = import ../development/compilers/ocaml { + inherit fetchurl stdenv x11 ncurses stdenvUsingSetupNew2; + stdenv34 = overrideGCC stdenv gcc34; }; /* @@ -1108,7 +1106,7 @@ rec { qcmm = import ../development/compilers/qcmm { lua = lua4; - ocaml = ocaml3080; + ocaml = ocaml_alts.v_3_08_0; inherit fetchurl stdenv mk noweb groff; };