1 { lib, stdenv, fetchurl, perl, ocaml, findlib, ocamlbuild }:
3 if lib.versionAtLeast ocaml.version "4.06"
4 then throw "cil is not available for OCaml ${ocaml.version}"
7 stdenv.mkDerivation rec {
12 url = "mirror://sourceforge/cil/cil-${version}.tar.gz";
13 sha256 = "05739da0b0msx6kmdavr3y2bwi92jbh3szc35d7d8pdisa8g5dv9";
16 nativeBuildInputs = [ perl ocaml findlib ocamlbuild ];
20 createFindlibDestdir = true;
23 substituteInPlace Makefile.in --replace 'MACHDEPCC=gcc' 'MACHDEPCC=$(CC)'
24 export FORCE_PERL_PREFIX=1
26 prefixKey = "-prefix=";
29 homepage = "http://kerneis.github.io/cil/";
30 description = "A front-end for the C programming language that facilitates program analysis and transformation";
31 license = licenses.bsd3;
32 maintainers = [ maintainers.vbgl ];
33 platforms = ocaml.meta.platforms or [ ];