2018-09-05 17:11:47 +01:00
|
|
|
{ stdenv, fetchurl, ocaml, findlib, dune }:
|
2018-01-01 09:43:46 +00:00
|
|
|
|
|
|
|
assert stdenv.lib.versionAtLeast (stdenv.lib.getVersion ocaml) "4.01";
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "wtf8";
|
|
|
|
name = "ocaml-${pname}-${version}";
|
|
|
|
version = "1.0.1";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/flowtype/ocaml-${pname}/releases/download/v${version}/${pname}-${version}.tbz";
|
|
|
|
sha256 = "1msg3vycd3k8qqj61sc23qks541cxpb97vrnrvrhjnqxsqnh6ygq";
|
|
|
|
};
|
|
|
|
|
|
|
|
unpackCmd = "tar xjf $src";
|
|
|
|
|
2018-09-05 17:11:47 +01:00
|
|
|
buildInputs = [ ocaml findlib dune ];
|
2018-01-01 09:43:46 +00:00
|
|
|
|
2018-09-05 17:11:47 +01:00
|
|
|
buildPhase = "dune build -p wtf8";
|
2018-01-01 09:43:46 +00:00
|
|
|
|
2018-09-05 17:11:47 +01:00
|
|
|
inherit (dune) installPhase;
|
2018-01-01 09:43:46 +00:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = https://github.com/flowtype/ocaml-wtf8;
|
|
|
|
description = "WTF-8 is a superset of UTF-8 that allows unpaired surrogates.";
|
|
|
|
license = licenses.mit;
|
|
|
|
platforms = ocaml.meta.platforms or [];
|
|
|
|
maintainers = [ maintainers.eqyiel ];
|
|
|
|
};
|
|
|
|
}
|