diff options
author | Vincent Laporte <Vincent.Laporte@gmail.com> | 2020-03-08 16:58:47 +0100 |
---|---|---|
committer | Vincent Laporte <vbgl@users.noreply.github.com> | 2020-03-13 22:31:01 +0100 |
commit | e73a9e6b9526fe3ba2f1fae755fbe120e1c5240f (patch) | |
tree | d2adc83c0bb48fc9a4ab03e31696e37c04b1c2d1 /pkgs/development/ocaml-modules/sedlex | |
parent | 0729b8c55e0dfaf302af4c57546871d47a652048 (diff) |
ocamlPackages.sedlex_2: fix build with OCaml ≥ 4.08
Diffstat (limited to 'pkgs/development/ocaml-modules/sedlex')
-rw-r--r-- | pkgs/development/ocaml-modules/sedlex/2.nix | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/pkgs/development/ocaml-modules/sedlex/2.nix b/pkgs/development/ocaml-modules/sedlex/2.nix index 09390a27343f9..26c35b9833927 100644 --- a/pkgs/development/ocaml-modules/sedlex/2.nix +++ b/pkgs/development/ocaml-modules/sedlex/2.nix @@ -1,16 +1,15 @@ -{ stdenv +{ lib , fetchFromGitHub , fetchurl +, buildDunePackage , ocaml -, dune -, findlib , gen , ppx_tools_versioned , ocaml-migrate-parsetree , uchar }: -if stdenv.lib.versionOlder ocaml.version "4.02.3" +if lib.versionOlder ocaml.version "4.02.3" then throw "sedlex is not available for OCaml ${ocaml.version}" else @@ -28,8 +27,8 @@ let sha256 = "0gsb1jpj3mnqbjgbavi4l95gl6g4agq58j82km22fdfg63j3w3fk"; }; in -stdenv.mkDerivation rec { - name = "ocaml${ocaml.version}-sedlex-${version}"; +buildDunePackage rec { + pname = "sedlex"; version = "2.1"; src = fetchFromGitHub { @@ -39,7 +38,7 @@ stdenv.mkDerivation rec { sha256 = "05f6qa8x3vhpdz1fcnpqk37fpnyyq13icqsk2gww5idjnh6kng26"; }; - buildInputs = [ ocaml findlib dune ppx_tools_versioned ocaml-migrate-parsetree ]; + buildInputs = [ ppx_tools_versioned ocaml-migrate-parsetree ]; propagatedBuildInputs = [ gen uchar ]; @@ -49,21 +48,14 @@ stdenv.mkDerivation rec { ln -s ${PropList} src/generator/data/PropList.txt ''; - buildFlags = [ "build" ]; - - installPhase = '' - make INSTALL_ARGS="--prefix=$out --libdir=$OCAMLFIND_DESTDIR" install - ''; - - createFindlibDestdir = true; + doCheck = true; dontStrip = true; meta = { homepage = https://github.com/ocaml-community/sedlex; description = "An OCaml lexer generator for Unicode"; - license = stdenv.lib.licenses.mit; - inherit (ocaml.meta) platforms; - maintainers = [ stdenv.lib.maintainers.marsam ]; + license = lib.licenses.mit; + maintainers = [ lib.maintainers.marsam ]; }; } |