about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/ocaml-modules/iri/default.nix
blob: 15f3a5613b55a119285a3dbf453b3e96462215e7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{ stdenv, fetchFromGitLab, ocaml, findlib
, sedlex, uunf, uutf
}:

if !stdenv.lib.versionAtLeast ocaml.version "4.03"
then throw "iri is not available for OCaml ${ocaml.version}"
else

stdenv.mkDerivation rec {
  version = "0.4.0";
  name = "ocaml${ocaml.version}-iri-${version}";

  src = fetchFromGitLab {
    domain = "framagit.org";
    owner = "zoggy";
    repo = "ocaml-iri";
    rev = version;
    sha256 = "0fsmfmzmyggm0h77a7mb0n41vqi6q4ln1xzsv72zbvysa7l8w84q";
  };

  buildInputs = [ ocaml findlib ];

  propagatedBuildInputs = [ sedlex uunf uutf ];

  createFindlibDestdir = true;

  meta = {
    description = "IRI (RFC3987) native OCaml implementation";
    license = stdenv.lib.licenses.lgpl3;
    maintainers = [ stdenv.lib.maintainers.vbgl ];
    inherit (src.meta) homepage;
    inherit (ocaml.meta) platforms;
  };
}