lol

ocamlPackages.optcomp: fix build with OCaml 4.06

+35 -1
+12
pkgs/development/ocaml-modules/optcomp/META
··· 1 + # OASIS_START 2 + # DO NOT EDIT (digest: ec844fa3189acb2a866b89a69d111ba4) 3 + version = "1.6" 4 + description = "Optional compilation with cpp-like directives" 5 + requires = "camlp4" 6 + archive(syntax, preprocessor) = "optcomp.cma" 7 + archive(syntax, toploop) = "optcomp.cma" 8 + archive(syntax, preprocessor, native) = "optcomp.cmxa" 9 + archive(syntax, preprocessor, native, plugin) = "optcomp.cmxs" 10 + exists_if = "optcomp.cma" 11 + # OASIS_STOP 12 +
+23 -1
pkgs/development/ocaml-modules/optcomp/default.nix
··· 1 - { stdenv, fetchurl, ocaml, findlib, ocamlbuild, camlp4 }: 1 + { stdenv, fetchurl, fetchpatch, ocaml, findlib, ocamlbuild, camlp4 }: 2 2 3 3 stdenv.mkDerivation { 4 4 name = "ocaml-optcomp-1.6"; ··· 6 6 url = https://github.com/diml/optcomp/archive/1.6.tar.gz; 7 7 sha256 = "0hhhb2gisah1h22zlg5iszbgqxdd7x85cwd57bd4mfkx9l7dh8jh"; 8 8 }; 9 + 10 + patches = 11 + let inherit (stdenv.lib) optional versionAtLeast; in 12 + optional (versionAtLeast ocaml.version "4.02") (fetchpatch { 13 + url = "https://github.com/diml/optcomp/commit/b7f809360c9794b383a4bc0492f6df381276b429.patch"; 14 + sha256 = "1n095lk94jq1rwi0l24g2wbgms7249wdd31n0ji895dr6755s93y"; 15 + }) 16 + ; 9 17 10 18 createFindlibDestdir = true; 11 19 12 20 buildInputs = [ ocaml findlib ocamlbuild camlp4 ]; 13 21 22 + configurePhase = '' 23 + cp ${./META} META 24 + ''; 25 + 26 + buildPhase = '' 27 + ocamlbuild src/optcomp.cmxs src/optcomp.cma src/optcomp_o.native src/optcomp_r.native 28 + ''; 29 + 30 + installPhase = '' 31 + mkdir -p $out/bin 32 + cp _build/src/optcomp_o.native $out/bin/optcomp-o 33 + cp _build/src/optcomp_r.native $out/bin/optcomp-r 34 + ocamlfind install optcomp META _build/src/optcomp.{a,cma,cmxa,cmxs} _build/src/pa_optcomp.{cmi,cmx,mli} 35 + ''; 14 36 15 37 meta = { 16 38 homepage = https://github.com/diml/optcomp;