nixpkgs/pkgs/development/ocaml-modules/ulex/default.nix

41 lines
1012 B
Nix
Raw Normal View History

2017-11-29 18:58:56 +00:00
{ stdenv, fetchFromGitHub, ocaml, findlib, ocamlbuild, camlp4 }:
let
pname = "ulex";
2017-11-29 18:58:56 +00:00
param =
if stdenv.lib.versionAtLeast ocaml.version "4.02" then {
version = "1.2";
sha256 = "08yf2x9a52l2y4savjqfjd2xy4pjd1rpla2ylrr9qrz1drpfw4ic";
} else {
version = "1.1";
sha256 = "0cmscxcmcxhlshh4jd0lzw5ffzns12x3bj7h27smbc8waxkwffhl";
};
in
2016-10-05 08:32:30 +01:00
stdenv.mkDerivation rec {
2017-11-29 18:58:56 +00:00
name = "ocaml${ocaml.version}-${pname}-${version}";
inherit (param) version;
2017-11-29 18:58:56 +00:00
src = fetchFromGitHub {
owner = "whitequark";
repo = pname;
rev = "v${version}";
inherit (param) sha256;
};
createFindlibDestdir = true;
buildInputs = [ ocaml findlib ocamlbuild ];
propagatedBuildInputs = [ camlp4 ];
buildFlags = [ "all" "all.opt" ];
meta = {
2017-11-29 18:58:56 +00:00
inherit (src.meta) homepage;
description = "A lexer generator for Unicode and OCaml";
license = stdenv.lib.licenses.mit;
platforms = ocaml.meta.platforms or [];
maintainers = [ stdenv.lib.maintainers.roconnor ];
};
}