2018-11-27 18:25:33 +01:00
|
|
|
{ stdenv, lib, fetchurl, fetchpatch, fetchFromGitHub, ocaml, findlib }:
|
2018-08-21 15:45:30 +02:00
|
|
|
|
2018-11-27 18:25:33 +01:00
|
|
|
let
|
|
|
|
meta_file = fetchurl {
|
2020-04-01 03:11:51 +02:00
|
|
|
url = "https://raw.githubusercontent.com/ocaml/opam-repository/3c191ae9356ca7b3b628f2707cfcb863db42480f/packages/FrontC/FrontC.3.4.1/files/META";
|
2018-11-27 18:25:33 +01:00
|
|
|
sha256 = "0s2wsinycldk8y5p09xd0hsgbhckhy7bkghzl63bph6mwv64kq2d";
|
|
|
|
};
|
|
|
|
in
|
2016-09-20 23:01:43 +02:00
|
|
|
|
2018-11-27 18:25:33 +01:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "ocaml${ocaml.version}-FrontC-${version}";
|
|
|
|
version = "3.4.1";
|
2016-09-20 23:01:43 +02:00
|
|
|
|
2018-11-27 18:25:33 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "BinaryAnalysisPlatform";
|
|
|
|
repo = "FrontC";
|
|
|
|
rev = "V_3_4_1";
|
|
|
|
sha256 = "1dq5nks0c9gsbr1m8k39m1bniawr5hqcy1r8x5px7naa95ch06ak";
|
2016-09-20 23:01:43 +02:00
|
|
|
};
|
|
|
|
|
2018-11-27 18:25:33 +01:00
|
|
|
buildInputs = [ ocaml findlib ];
|
|
|
|
|
2016-09-20 23:01:43 +02:00
|
|
|
meta = with lib; {
|
2018-11-27 18:25:33 +01:00
|
|
|
inherit (src.meta) homepage;
|
|
|
|
inherit (ocaml.meta) platforms;
|
2016-09-20 23:01:43 +02:00
|
|
|
description = "C Parsing Library";
|
|
|
|
license = licenses.lgpl21;
|
|
|
|
maintainers = [ maintainers.maurer ];
|
|
|
|
};
|
|
|
|
|
2018-11-27 18:25:33 +01:00
|
|
|
patches = [ (fetchpatch {
|
2020-04-01 03:11:51 +02:00
|
|
|
url = "https://raw.githubusercontent.com/ocaml/opam-repository/3c191ae9356ca7b3b628f2707cfcb863db42480f/packages/FrontC/FrontC.3.4.1/files/opam.patch";
|
2018-11-27 18:25:33 +01:00
|
|
|
sha256 = "0v4f6740jbj1kxg1y03dzfa3x3gsrhv06wpzdj30gl4ki5fvj4hs";
|
|
|
|
})
|
|
|
|
];
|
2016-09-20 23:01:43 +02:00
|
|
|
|
2019-10-27 14:03:25 +01:00
|
|
|
makeFlags = [ "PREFIX=$(out)" "OCAML_SITE=$(OCAMLFIND_DESTDIR)" ];
|
2016-09-20 23:01:43 +02:00
|
|
|
|
|
|
|
postInstall = "cp ${meta_file} $OCAMLFIND_DESTDIR/FrontC/META";
|
|
|
|
}
|