summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorVolth <volth@webmaster.ms>2017-07-04 21:39:37 +0000
committerVincent Laporte <Vincent.Laporte@gmail.com>2017-07-05 17:48:45 +0000
commit18e3799cd1fcce8a1b37e182e65e3edc4c0f0a0e (patch)
tree79e4981392ab99754241354cfc70d096197d459d /pkgs
parentf9a2866508c1133ea54d4174feb8a76b689eb616 (diff)
downloadnixlib-18e3799cd1fcce8a1b37e182e65e3edc4c0f0a0e.tar
nixlib-18e3799cd1fcce8a1b37e182e65e3edc4c0f0a0e.tar.gz
nixlib-18e3799cd1fcce8a1b37e182e65e3edc4c0f0a0e.tar.bz2
nixlib-18e3799cd1fcce8a1b37e182e65e3edc4c0f0a0e.tar.lz
nixlib-18e3799cd1fcce8a1b37e182e65e3edc4c0f0a0e.tar.xz
nixlib-18e3799cd1fcce8a1b37e182e65e3edc4c0f0a0e.tar.zst
nixlib-18e3799cd1fcce8a1b37e182e65e3edc4c0f0a0e.zip
ocamlPackages.{benchmark,obuild,ptmap,rope}: init at 1.4, 0.1.8, 2.0.1, 0.5
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/ocaml-modules/benchmark/default.nix24
-rw-r--r--pkgs/development/ocaml-modules/ptmap/default.nix34
-rw-r--r--pkgs/development/ocaml-modules/rope/default.nix24
-rw-r--r--pkgs/development/tools/ocaml/obuild/default.nix31
-rw-r--r--pkgs/top-level/all-packages.nix2
-rw-r--r--pkgs/top-level/ocaml-packages.nix6
6 files changed, 121 insertions, 0 deletions
diff --git a/pkgs/development/ocaml-modules/benchmark/default.nix b/pkgs/development/ocaml-modules/benchmark/default.nix
new file mode 100644
index 000000000000..de2010275ef9
--- /dev/null
+++ b/pkgs/development/ocaml-modules/benchmark/default.nix
@@ -0,0 +1,24 @@
+{ stdenv, fetchzip, ocaml, findlib, ocamlbuild, ocaml_pcre }:
+
+let version = "1.4"; in
+
+stdenv.mkDerivation {
+  name = "ocaml${ocaml.version}-benchmark-${version}";
+
+  src = fetchzip {
+    url = "https://github.com/Chris00/ocaml-benchmark/releases/download/${version}/benchmark-${version}.tar.gz";
+    sha256 = "16wi8ld7c3mq77ylpgbnj8qqqqimyzwxs47v06vyrwpma5pab5xa";
+  };
+
+  buildInputs = [ ocaml findlib ocamlbuild ocaml_pcre ];
+
+  createFindlibDestdir = true;
+
+  meta = {
+    homepage = http://ocaml-benchmark.forge.ocamlcore.org/;
+    platforms = ocaml.meta.platforms or [];
+    description = "Benchmark running times of code";
+    license = stdenv.lib.licenses.lgpl21;
+    maintainers = with stdenv.lib.maintainers; [ volth ];
+  };
+}
diff --git a/pkgs/development/ocaml-modules/ptmap/default.nix b/pkgs/development/ocaml-modules/ptmap/default.nix
new file mode 100644
index 000000000000..aa44fe3d009b
--- /dev/null
+++ b/pkgs/development/ocaml-modules/ptmap/default.nix
@@ -0,0 +1,34 @@
+{ stdenv, fetchzip, ocaml, findlib, obuild }:
+
+let version = "2.0.1"; in
+
+stdenv.mkDerivation {
+  name = "ocaml${ocaml.version}-ptmap-${version}";
+
+  src = fetchzip {
+    url = "https://github.com/UnixJunkie/ptmap/archive/v${version}.tar.gz";
+    sha256 = "09ib4q5amkac2yy0hr7yn1n1j6y10v08chh82qc70wl7s473if15";
+  };
+
+  buildInputs = [ ocaml findlib obuild ];
+
+  createFindlibDestdir = true;
+
+  buildPhase = ''
+    substituteInPlace ptmap.obuild --replace 'build-deps: qcheck' ""
+    obuild configure
+    obuild build lib-ptmap
+  '';
+
+  installPhase = ''
+    obuild install --destdir $out/lib/ocaml/${ocaml.version}/site-lib
+  '';
+
+  meta = {
+    homepage = https://www.lri.fr/~filliatr/software.en.html;
+    platforms = ocaml.meta.platforms or [];
+    description = "Maps over integers implemented as Patricia trees";
+    license = stdenv.lib.licenses.lgpl21;
+    maintainers = with stdenv.lib.maintainers; [ volth ];
+  };
+}
diff --git a/pkgs/development/ocaml-modules/rope/default.nix b/pkgs/development/ocaml-modules/rope/default.nix
new file mode 100644
index 000000000000..a62c321a4e83
--- /dev/null
+++ b/pkgs/development/ocaml-modules/rope/default.nix
@@ -0,0 +1,24 @@
+{ stdenv, fetchzip, ocaml, findlib, ocamlbuild, benchmark }:
+
+let version = "0.5"; in
+
+stdenv.mkDerivation {
+  name = "ocaml${ocaml.version}-rope-${version}";
+
+  src = fetchzip {
+    url = "https://forge.ocamlcore.org/frs/download.php/1156/rope-${version}.tar.gz";
+    sha256 = "1i8kzg19jrapl30mq8m91vy09z0r0dl4bnpw24ga96w8pxqf9qhd";
+  };
+
+  buildInputs = [ ocaml findlib ocamlbuild benchmark ];
+
+  createFindlibDestdir = true;
+
+  meta = {
+    homepage = http://rope.forge.ocamlcore.org/;
+    platforms = ocaml.meta.platforms or [];
+    description = ''Ropes ("heavyweight strings") in OCaml'';
+    license = stdenv.lib.licenses.lgpl21;
+    maintainers = with stdenv.lib.maintainers; [ volth ];
+  };
+}
diff --git a/pkgs/development/tools/ocaml/obuild/default.nix b/pkgs/development/tools/ocaml/obuild/default.nix
new file mode 100644
index 000000000000..b4df6f660a65
--- /dev/null
+++ b/pkgs/development/tools/ocaml/obuild/default.nix
@@ -0,0 +1,31 @@
+{ stdenv, fetchzip, ocamlPackages }:
+
+let version = "0.1.8"; in
+
+stdenv.mkDerivation {
+  name = "obuild-${version}";
+
+  src = fetchzip {
+    url = "https://github.com/ocaml-obuild/obuild/archive/obuild-v${version}.tar.gz";
+    sha256 = "1q1k2qqd08j1zakvydgvwgwpyn0ll7rs65gap0pvg3amnh5cp3wd";
+  };
+
+  buildInputs = with ocamlPackages; [ ocaml findlib ];
+
+  buildPhase = ''
+    ./bootstrap
+  '';
+
+  installPhase = ''
+    mkdir -p $out/bin
+    cp dist/build/obuild/obuild dist/build/obuild-from-oasis/obuild-from-oasis dist/build/obuild-simple/obuild-simple $out/bin/
+  '';
+
+  meta = {
+    homepage = https://github.com/ocaml-obuild/obuild;
+    platforms = ocamlPackages.ocaml.meta.platforms or [];
+    description = "Simple package build system for OCaml";
+    license = stdenv.lib.licenses.lgpl21;
+    maintainers = with stdenv.lib.maintainers; [ volth ];
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 7364d47d9904..4dfe9f28b829 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -6993,6 +6993,8 @@ with pkgs;
   noweb = callPackage ../development/tools/literate-programming/noweb { };
   nuweb = callPackage ../development/tools/literate-programming/nuweb { tex = texlive.combined.scheme-small; };
 
+  obuild = callPackage ../development/tools/ocaml/obuild { };
+
   omake = callPackage ../development/tools/ocaml/omake {
     inherit (ocamlPackages_4_02) ocaml;
   };
diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix
index 1c6116108170..fea8fe05babd 100644
--- a/pkgs/top-level/ocaml-packages.nix
+++ b/pkgs/top-level/ocaml-packages.nix
@@ -114,6 +114,8 @@ let
     };
     camlimages = camlimages_4_1;
 
+    benchmark = callPackage ../development/ocaml-modules/benchmark { };
+
     biniou = callPackage ../development/ocaml-modules/biniou { };
 
     bin_prot_p4 = callPackage ../development/ocaml-modules/bin_prot { };
@@ -551,6 +553,8 @@ let
 
     ppx_tools_versioned = callPackage ../development/ocaml-modules/ppx_tools_versioned { };
 
+    ptmap = callPackage ../development/ocaml-modules/ptmap { };
+
     pycaml = callPackage ../development/ocaml-modules/pycaml { };
 
     qcheck = callPackage ../development/ocaml-modules/qcheck { };
@@ -561,6 +565,8 @@ let
 
     reason = callPackage ../development/compilers/reason { };
 
+    rope = callPackage ../development/ocaml-modules/rope { };
+
     rresult = callPackage ../development/ocaml-modules/rresult { };
 
     safepass = callPackage ../development/ocaml-modules/safepass { };