From 671fb2d2d7fcbf639cb106f91f438540e64208ed Mon Sep 17 00:00:00 2001 From: Ruben Maher Date: Mon, 1 Jan 2018 20:13:46 +1030 Subject: ocamlPackages.wtf8: init at 1.0.1 --- pkgs/development/ocaml-modules/wtf8/default.nix | 32 +++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 pkgs/development/ocaml-modules/wtf8/default.nix (limited to 'pkgs/development/ocaml-modules') diff --git a/pkgs/development/ocaml-modules/wtf8/default.nix b/pkgs/development/ocaml-modules/wtf8/default.nix new file mode 100644 index 000000000000..4cde95c0c4cc --- /dev/null +++ b/pkgs/development/ocaml-modules/wtf8/default.nix @@ -0,0 +1,32 @@ +{ stdenv, fetchurl, ocaml, findlib, jbuilder }: + +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"; + + buildInputs = [ ocaml findlib jbuilder ]; + + buildPhase = "jbuilder build -p wtf8"; + + inherit (jbuilder) installPhase; + + createFindLibDestdir = true; + + 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 ]; + }; +} -- cgit 1.4.1