From 651a4c4e6eff03a4e1ec3b944434cab44bf657d0 Mon Sep 17 00:00:00 2001
From: Vincent Laporte <Vincent.Laporte@gmail.com>
Date: Wed, 4 Mar 2015 12:50:58 +0100
Subject: [PATCH] Adds ocaml-fileutils

ocaml-fileutils is a library of pure OCaml functions to manipulate real
files and filenames.

Homepage: http://ocaml-fileutils.forge.ocamlcore.org/
---
 .../ocaml-modules/fileutils/default.nix       | 22 +++++++++++++++++++
 pkgs/top-level/all-packages.nix               |  2 ++
 2 files changed, 24 insertions(+)
 create mode 100644 pkgs/development/ocaml-modules/fileutils/default.nix

diff --git a/pkgs/development/ocaml-modules/fileutils/default.nix b/pkgs/development/ocaml-modules/fileutils/default.nix
new file mode 100644
index 000000000000..8c3c42758375
--- /dev/null
+++ b/pkgs/development/ocaml-modules/fileutils/default.nix
@@ -0,0 +1,22 @@
+{ stdenv, fetchurl, ocaml, findlib }:
+
+stdenv.mkDerivation {
+  name = "ocaml-fileutils-0.4.5";
+
+  src = fetchurl {
+    url = https://forge.ocamlcore.org/frs/download.php/1194/ocaml-fileutils-0.4.5.tar.gz;
+    sha256 = "0rlqmcgjrfjihjgw5cfmack169cag8054gh5yrqph15av3lx5cra";
+  };
+
+  buildInputs = [ ocaml findlib ];
+
+  createFindlibDestdir = true;
+
+  meta = {
+    homepage = https://forge.ocamlcore.org/projects/ocaml-fileutils/;
+    platforms = ocaml.meta.platforms;
+    description = "Library to provide pure OCaml functions to manipulate real file (POSIX like) and filename";
+    license = stdenv.lib.licenses.lgpl21Plus;
+    maintainers = with stdenv.lib.maintainers; [ vbgl ];
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index f3598f8e17f1..93f43780b9e6 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -3905,6 +3905,8 @@ let
 
     fieldslib = callPackage ../development/ocaml-modules/fieldslib { };
 
+    fileutils = callPackage ../development/ocaml-modules/fileutils { };
+
     findlib = callPackage ../development/tools/ocaml/findlib { };
 
     fix = callPackage ../development/ocaml-modules/fix { };