3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/ocaml-modules/sedlex/default.nix
Anders Kaseorg 6920d8ca42 treewide: Simplify negated uses of versionAtLeast, versionOlder
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2022-04-25 13:35:24 -07:00

38 lines
988 B
Nix

{ stdenv, lib, fetchFromGitHub, ocaml, findlib, gen, ppx_tools_versioned, ocaml-migrate-parsetree }:
if lib.versionOlder ocaml.version "4.02"
then throw "sedlex is not available for OCaml ${ocaml.version}"
else
stdenv.mkDerivation rec {
pname = "ocaml${ocaml.version}-sedlex";
version = "1.99.5";
src = fetchFromGitHub {
owner = "ocaml-community";
repo = "sedlex";
rev = "fb84e1766fc4b29e79ec40029ffee5cdb37b392f";
sha256 = "sha256-VhzlDTYBFXgKWT69PqZYLuHkiaDwzhmyX2XfaqzHFl4=";
};
nativeBuildInputs = [ ocaml findlib ];
propagatedBuildInputs = [ gen ocaml-migrate-parsetree ppx_tools_versioned ];
strictDeps = true;
buildFlags = [ "all" "opt" ];
createFindlibDestdir = true;
dontStrip = true;
meta = {
homepage = "https://github.com/ocaml-community/sedlex";
description = "An OCaml lexer generator for Unicode";
license = lib.licenses.mit;
inherit (ocaml.meta) platforms;
maintainers = [ lib.maintainers.vbgl ];
};
}