nixpkgs/pkgs/development/ocaml-modules/sedlex/default.nix
Ulrik Strid a13cdfe520 ocamlPackages tree-wide: Move buildInputs that should be nativeBuildInputs
To keep this for the future we also strictDeps where possible, including for janePackages, topkg, oasis and ocamlbuild.
This makes some closures significantly smaller and makes cross compilation easier
2022-02-24 14:39:27 +01:00

38 lines
991 B
Nix

{ stdenv, lib, fetchFromGitHub, ocaml, findlib, gen, ppx_tools_versioned, ocaml-migrate-parsetree }:
if !lib.versionAtLeast 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 ];
};
}