mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-02 10:31:36 +00:00
31 lines
1,002 B
Nix
31 lines
1,002 B
Nix
{ stdenv, fetchzip, ocaml, findlib, ocamlbuild, ounit }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
name = "ocaml-re-${version}";
|
|
version = "1.7.1";
|
|
|
|
src = fetchzip {
|
|
url = "https://github.com/ocaml/ocaml-re/archive/${version}.tar.gz";
|
|
sha256 = "1z2z4fjrpdbl0q50fdxvy3746w1vx6ybxcb0k81hqm1342nylbmw";
|
|
};
|
|
|
|
buildInputs = [ ocaml findlib ocamlbuild ounit ];
|
|
|
|
configurePhase = "ocaml setup.ml -configure --prefix $out"
|
|
+ stdenv.lib.optionalString doCheck " --enable-tests";
|
|
buildPhase = "ocaml setup.ml -build";
|
|
doCheck = !stdenv.lib.versionAtLeast ocaml.version "4.06";
|
|
checkPhase = "ocaml setup.ml -test";
|
|
installPhase = "ocaml setup.ml -install";
|
|
|
|
createFindlibDestdir = true;
|
|
|
|
meta = {
|
|
homepage = https://github.com/ocaml/ocaml-re;
|
|
platforms = ocaml.meta.platforms or [];
|
|
description = "Pure OCaml regular expressions, with support for Perl and POSIX-style strings";
|
|
license = stdenv.lib.licenses.lgpl2;
|
|
maintainers = with stdenv.lib.maintainers; [ vbgl ];
|
|
};
|
|
}
|