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