lol
1{ stdenv, fetchurl, ocaml, findlib, jbuilder }:
2
3assert stdenv.lib.versionAtLeast (stdenv.lib.getVersion ocaml) "4.01";
4
5stdenv.mkDerivation rec {
6 pname = "wtf8";
7 name = "ocaml-${pname}-${version}";
8 version = "1.0.1";
9
10 src = fetchurl {
11 url = "https://github.com/flowtype/ocaml-${pname}/releases/download/v${version}/${pname}-${version}.tbz";
12 sha256 = "1msg3vycd3k8qqj61sc23qks541cxpb97vrnrvrhjnqxsqnh6ygq";
13 };
14
15 unpackCmd = "tar xjf $src";
16
17 buildInputs = [ ocaml findlib jbuilder ];
18
19 buildPhase = "jbuilder build -p wtf8";
20
21 inherit (jbuilder) installPhase;
22
23 createFindLibDestdir = true;
24
25 meta = with stdenv.lib; {
26 homepage = https://github.com/flowtype/ocaml-wtf8;
27 description = "WTF-8 is a superset of UTF-8 that allows unpaired surrogates.";
28 license = licenses.mit;
29 platforms = ocaml.meta.platforms or [];
30 maintainers = [ maintainers.eqyiel ];
31 };
32}