about summary refs log tree commit diff
path: root/pkgs/development/tools/ocaml
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/tools/ocaml')
-rw-r--r--pkgs/development/tools/ocaml/dune/3.nix12
-rw-r--r--pkgs/development/tools/ocaml/omake/default.nix7
-rw-r--r--pkgs/development/tools/ocaml/opam/1.2.2.nix95
3 files changed, 11 insertions, 103 deletions
diff --git a/pkgs/development/tools/ocaml/dune/3.nix b/pkgs/development/tools/ocaml/dune/3.nix
index 7c305012c57ea..06d2323af7cdd 100644
--- a/pkgs/development/tools/ocaml/dune/3.nix
+++ b/pkgs/development/tools/ocaml/dune/3.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchurl, ocaml, findlib, darwin }:
+{ lib, stdenv, fetchurl, ocaml, findlib, darwin, ocaml-lsp }:
 
 if lib.versionOlder ocaml.version "4.08"
 then throw "dune 3 is not available for OCaml ${ocaml.version}"
@@ -6,17 +6,17 @@ else
 
 stdenv.mkDerivation rec {
   pname = "dune";
-  version = "3.6.2";
+  version = "3.7.0";
 
   src = fetchurl {
     url = "https://github.com/ocaml/dune/releases/download/${version}/dune-${version}.tbz";
-    sha256 = "sha256-ttSrhI77BKoqMl0AFdMu1EFO1xMOx6oS+YFY7/RFzzw=";
+    sha256 = "sha256-4tY3ydCAMY/t9ecdKin7NnYk+CrEom6D3ys6A1UFKLg=";
   };
 
   nativeBuildInputs = [ ocaml findlib ];
 
   buildInputs = lib.optionals stdenv.isDarwin [
-    darwin.apple_sdk.frameworks.Foundation
+    darwin.apple_sdk.frameworks.CoreServices
   ];
 
   strictDeps = true;
@@ -29,6 +29,10 @@ stdenv.mkDerivation rec {
 
   installFlags = [ "PREFIX=${placeholder "out"}" "LIBDIR=$(OCAMLFIND_DESTDIR)" ];
 
+  passthru.tests = {
+    inherit ocaml-lsp;
+  };
+
   meta = {
     homepage = "https://dune.build/";
     description = "A composable build system";
diff --git a/pkgs/development/tools/ocaml/omake/default.nix b/pkgs/development/tools/ocaml/omake/default.nix
index b7d670ce4a7e7..32650f80b5816 100644
--- a/pkgs/development/tools/ocaml/omake/default.nix
+++ b/pkgs/development/tools/ocaml/omake/default.nix
@@ -1,19 +1,18 @@
-{ lib, stdenv, fetchurl, ocaml, ncurses }:
+{ lib, stdenv, fetchurl, ocaml }:
 
 stdenv.mkDerivation rec {
 
   pname = "omake";
-  version = "0.10.5";
+  version = "0.10.6";
 
   src = fetchurl {
     url = "http://download.camlcity.org/download/${pname}-${version}.tar.gz";
-    sha256 = "sha256-VOFq2KLBbmZCRgHzfpD7p0iyF8yU1tTbyvTiOcpm98Q=";
+    hash = "sha256-AuSZEnybyk8HaDZ7mbwDqjFXMXVQ7TDRuRU/aRY8/yE=";
   };
 
   strictDeps = true;
 
   nativeBuildInputs = [ ocaml ];
-  buildInputs = [ ncurses ];
 
   meta = {
     description = "A build system designed for scalability and portability";
diff --git a/pkgs/development/tools/ocaml/opam/1.2.2.nix b/pkgs/development/tools/ocaml/opam/1.2.2.nix
deleted file mode 100644
index 23a73002e6fe1..0000000000000
--- a/pkgs/development/tools/ocaml/opam/1.2.2.nix
+++ /dev/null
@@ -1,95 +0,0 @@
-{ stdenv, lib, fetchurl, makeWrapper,
-  ocaml, unzip, ncurses, curl, aspcud
-}:
-
-assert lib.versionAtLeast ocaml.version "3.12.1";
-
-let
-  srcs = {
-    cudf = fetchurl {
-      url = "https://gforge.inria.fr/frs/download.php/file/33593/cudf-0.7.tar.gz";
-      sha256 = "92c8a9ed730bbac73f3513abab41127d966c9b9202ab2aaffcd02358c030a701";
-    };
-    extlib = fetchurl {
-      url = "http://ocaml-extlib.googlecode.com/files/extlib-1.5.3.tar.gz";
-      sha256 = "c095eef4202a8614ff1474d4c08c50c32d6ca82d1015387785cf03d5913ec021";
-    };
-    ocaml_re = fetchurl {
-      url = "https://github.com/ocaml/ocaml-re/archive/ocaml-re-1.2.0.tar.gz";
-      sha256 = "a34dd9d6136731436a963bbab5c4bbb16e5d4e21b3b851d34887a3dec451999f";
-    };
-    ocamlgraph = fetchurl {
-      url = "http://ocamlgraph.lri.fr/download/ocamlgraph-1.8.5.tar.gz";
-      sha256 = "d167466435a155c779d5ec25b2db83ad851feb42ebc37dca8ffa345ddaefb82f";
-    };
-    dose3 = fetchurl {
-      url = "https://gforge.inria.fr/frs/download.php/file/34277/dose3-3.3.tar.gz";
-      sha256 = "8dc4dae9b1a81bb3a42abb283df785ba3eb00ade29b13875821c69f03e00680e";
-    };
-    cmdliner = fetchurl {
-      url = "https://erratique.ch/software/cmdliner/releases/cmdliner-0.9.7.tbz";
-      sha256 = "9c19893cffb5d3c3469ee0cce85e3eeeba17d309b33b9ace31aba06f68f0bf7a";
-    };
-    uutf = fetchurl {
-      url = "https://erratique.ch/software/uutf/releases/uutf-0.9.3.tbz";
-      sha256 = "1f364f89b1179e5182a4d3ad8975f57389d45548735d19054845e06a27107877";
-    };
-    jsonm = fetchurl {
-      url = "https://erratique.ch/software/jsonm/releases/jsonm-0.9.1.tbz";
-      sha256 = "3fd4dca045d82332da847e65e981d8b504883571d299a3f7e71447d46bc65f73";
-    };
-    opam = fetchurl {
-      url = "https://github.com/ocaml/opam/archive/1.2.2.zip";
-      sha256 = "c590ce55ae69ec74f46215cf16a156a02b23c5f3ecb22f23a3ad9ba3d91ddb6e";
-    };
-  };
-in stdenv.mkDerivation {
-  pname = "opam";
-  version = "1.2.2";
-
-  strictDeps = true;
-
-  nativeBuildInputs = [ makeWrapper unzip curl ocaml ];
-  buildInputs = [ ncurses ];
-
-  src = srcs.opam;
-
-  postUnpack = ''
-    ln -sv ${srcs.cudf} $sourceRoot/src_ext/${srcs.cudf.name}
-    ln -sv ${srcs.extlib} $sourceRoot/src_ext/${srcs.extlib.name}
-    ln -sv ${srcs.ocaml_re} $sourceRoot/src_ext/${srcs.ocaml_re.name}
-    ln -sv ${srcs.ocamlgraph} $sourceRoot/src_ext/${srcs.ocamlgraph.name}
-    ln -sv ${srcs.dose3} $sourceRoot/src_ext/${srcs.dose3.name}
-    ln -sv ${srcs.cmdliner} $sourceRoot/src_ext/${srcs.cmdliner.name}
-    ln -sv ${srcs.uutf} $sourceRoot/src_ext/${srcs.uutf.name}
-    ln -sv ${srcs.jsonm} $sourceRoot/src_ext/${srcs.jsonm.name}
-  '';
-
-  preConfigure = ''
-    substituteInPlace ./src_ext/Makefile --replace "%.stamp: %.download" "%.stamp:"
-  '';
-
-  postConfigure = "make lib-ext";
-
-  # Dirty, but apparently ocp-build requires a TERM
-  makeFlags = ["TERM=screen"];
-
-  # change argv0 to "opam" as a workaround for
-  # https://github.com/ocaml/opam/issues/2142
-  postInstall = ''
-    mv $out/bin/opam $out/bin/.opam-wrapped
-    makeWrapper $out/bin/.opam-wrapped $out/bin/opam \
-      --argv0 "opam" \
-      --suffix PATH : ${aspcud}/bin:${unzip}/bin:${curl}/bin
-  '';
-
-  doCheck = false;
-
-  meta = with lib; {
-    description = "A package manager for OCaml";
-    homepage = "http://opam.ocamlpro.com/";
-    maintainers = [ maintainers.henrytill ];
-    platforms = platforms.all;
-    license = licenses.lgpl21Plus;
-  };
-}