1{
2 stdenv,
3 lib,
4 fetchurl,
5 ocaml,
6 findlib,
7 ocamlbuild,
8 topkg,
9 astring,
10}:
11
12if lib.versionOlder ocaml.version "4.03" then
13 throw "fpath is not available for OCaml ${ocaml.version}"
14else
15
16 stdenv.mkDerivation rec {
17 pname = "ocaml${ocaml.version}-fpath";
18 version = "0.7.3";
19
20 src = fetchurl {
21 url = "https://erratique.ch/software/fpath/releases/fpath-${version}.tbz";
22 sha256 = "03z7mj0sqdz465rc4drj1gr88l9q3nfs374yssvdjdyhjbqqzc0j";
23 };
24
25 nativeBuildInputs = [
26 ocaml
27 findlib
28 ocamlbuild
29 topkg
30 ];
31 buildInputs = [ topkg ];
32
33 propagatedBuildInputs = [ astring ];
34
35 strictDeps = true;
36
37 inherit (topkg) buildPhase installPhase;
38
39 meta = {
40 description = "OCaml module for handling file system paths with POSIX and Windows conventions";
41 homepage = "https://erratique.ch/software/fpath";
42 license = lib.licenses.isc;
43 maintainers = [ lib.maintainers.vbgl ];
44 inherit (ocaml.meta) platforms;
45 };
46 }