2016-05-22 17:22:25 +02:00
|
|
|
{ stdenv, fetchFromGitHub, ocaml, findlib }:
|
2014-06-25 10:25:14 +02:00
|
|
|
let
|
|
|
|
pname = "cppo";
|
2016-05-22 17:22:25 +02:00
|
|
|
version = "1.3.2";
|
2014-06-25 10:25:14 +02:00
|
|
|
webpage = "http://mjambon.com/${pname}.html";
|
|
|
|
in
|
2014-09-21 12:02:55 +02:00
|
|
|
assert stdenv.lib.versionAtLeast (stdenv.lib.getVersion ocaml) "3.12";
|
2014-06-25 10:25:14 +02:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
|
|
|
|
name = "${pname}-${version}";
|
|
|
|
|
2016-05-22 17:22:25 +02:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mjambon";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "06j0zr78f04ahxi2459vjn61z25hkvs4dfj76200ydg3g6ifb3k1";
|
2014-06-25 10:25:14 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ ocaml findlib ];
|
|
|
|
|
|
|
|
createFindlibDestdir = true;
|
|
|
|
|
|
|
|
makeFlags = "PREFIX=$(out)";
|
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
mkdir $out/bin
|
|
|
|
'';
|
|
|
|
|
2014-09-21 12:02:55 +02:00
|
|
|
meta = with stdenv.lib; {
|
2014-06-25 10:25:14 +02:00
|
|
|
description = "The C preprocessor for OCaml";
|
|
|
|
longDescription = ''
|
|
|
|
Cppo is an equivalent of the C preprocessor targeted at the OCaml language and its variants.
|
|
|
|
'';
|
|
|
|
homepage = "${webpage}";
|
2014-09-21 12:02:55 +02:00
|
|
|
maintainers = [ maintainers.vbgl ];
|
|
|
|
license = licenses.bsd3;
|
2014-06-25 10:25:14 +02:00
|
|
|
};
|
|
|
|
}
|