summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules/stringext/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/ocaml-modules/stringext/default.nix')
-rw-r--r--pkgs/development/ocaml-modules/stringext/default.nix28
1 files changed, 28 insertions, 0 deletions
diff --git a/pkgs/development/ocaml-modules/stringext/default.nix b/pkgs/development/ocaml-modules/stringext/default.nix
new file mode 100644
index 00000000000..dae947035d2
--- /dev/null
+++ b/pkgs/development/ocaml-modules/stringext/default.nix
@@ -0,0 +1,28 @@
+{ stdenv, fetchzip, ocaml, findlib }:
+
+let version = "1.3.0"; in
+
+stdenv.mkDerivation {
+  name = "ocaml-stringext-${version}";
+
+  src = fetchzip {
+    url = "https://github.com/rgrinberg/stringext/archive/v${version}.tar.gz";
+    sha256 = "0sd1chyxclmip0nxqhasp1ri91bwxr8nszkkr5kpja45f6bav6k9";
+  };
+
+  buildInputs = [ ocaml findlib ];
+
+  configurePhase = "ocaml setup.ml -configure --prefix $out";
+  buildPhase = "ocaml setup.ml -build";
+  installPhase = "ocaml setup.ml -install";
+
+  createFindlibDestdir = true;
+
+  meta = {
+    homepage = https://github.com/rgrinberg/stringext;
+    platforms = ocaml.meta.platforms;
+    description = "Extra string functions for OCaml";
+    license = stdenv.lib.licenses.mit;
+    maintainers = with stdenv.lib.maintainers; [ vbgl ];
+  };
+}