nixpkgs/pkgs/development/ocaml-modules/cil/default.nix

34 lines
950 B
Nix
Raw Normal View History

{ lib, stdenv, fetchurl, perl, ocaml, findlib, ocamlbuild }:
if lib.versionAtLeast ocaml.version "4.06"
then throw "cil is not available for OCaml ${ocaml.version}"
else
stdenv.mkDerivation rec {
pname = "ocaml-cil";
version = "1.7.3";
2014-11-22 23:50:31 +01:00
src = fetchurl {
url = "mirror://sourceforge/cil/cil-${version}.tar.gz";
2014-11-22 23:50:31 +01:00
sha256 = "05739da0b0msx6kmdavr3y2bwi92jbh3szc35d7d8pdisa8g5dv9";
};
buildInputs = [ perl ocaml findlib ocamlbuild ];
2014-11-22 23:50:31 +01:00
createFindlibDestdir = true;
preConfigure = ''
2018-02-21 18:21:11 +01:00
substituteInPlace Makefile.in --replace 'MACHDEPCC=gcc' 'MACHDEPCC=$(CC)'
2014-11-22 23:50:31 +01:00
export FORCE_PERL_PREFIX=1
'';
prefixKey = "-prefix=";
meta = with lib; {
homepage = "http://kerneis.github.io/cil/";
2014-11-22 23:50:31 +01:00
description = "A front-end for the C programming language that facilitates program analysis and transformation";
license = licenses.bsd3;
maintainers = [ maintainers.vbgl ];
2021-11-09 20:53:19 +01:00
platforms = ocaml.meta.platforms or [ ];
2014-11-22 23:50:31 +01:00
};
}