summaryrefslogtreecommitdiffstats
path: root/pkgs/development/ocaml-modules/cil/default.nix
blob: 7f45f97e4d0e71fe838e410dae2c0e1d5c748bc2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
{
  lib,
  stdenv,
  fetchurl,
  perl,
  ocaml,
  findlib,
  ocamlbuild,
}:

stdenv.mkDerivation rec {
  pname = "ocaml-cil";
  version = "1.7.3";

  src = fetchurl {
    url = "mirror://sourceforge/cil/cil-${version}.tar.gz";
    sha256 = "05739da0b0msx6kmdavr3y2bwi92jbh3szc35d7d8pdisa8g5dv9";
  };

  nativeBuildInputs = [
    perl
    ocaml
    findlib
    ocamlbuild
  ];

  strictDeps = true;

  createFindlibDestdir = true;

  preConfigure = ''
    substituteInPlace Makefile.in --replace 'MACHDEPCC=gcc' 'MACHDEPCC=$(CC)'
    export FORCE_PERL_PREFIX=1
  '';
  prefixKey = "-prefix=";

  meta = {
    homepage = "https://sourceforge.net/projects/cil/";
    description = "Front-end for the C programming language that facilitates program analysis and transformation";
    license = lib.licenses.bsd3;
    maintainers = [ lib.maintainers.vbgl ];
    broken = lib.versionAtLeast ocaml.version "4.06";
    platforms = ocaml.meta.platforms or [ ];
  };
}