2015-10-31 16:33:05 +00:00
|
|
|
{ stdenv, fetchurl, coq, ncurses
|
2015-05-28 15:09:05 +01:00
|
|
|
, graphviz, withDoc ? true
|
|
|
|
, src, patches ? []
|
|
|
|
}:
|
2015-04-24 17:51:05 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
|
2015-06-17 10:06:51 +01:00
|
|
|
name = "coq-ssreflect-1.5-${coq.coq-version}";
|
2015-04-24 17:51:05 +01:00
|
|
|
|
2015-05-28 15:09:05 +01:00
|
|
|
inherit src;
|
2015-04-24 17:51:05 +01:00
|
|
|
|
2015-05-28 15:09:05 +01:00
|
|
|
nativeBuildInputs = stdenv.lib.optionals withDoc [ graphviz ];
|
2015-10-31 16:33:05 +00:00
|
|
|
buildInputs = [ coq.ocaml coq.camlp5 ncurses ];
|
2015-04-24 17:51:05 +01:00
|
|
|
propagatedBuildInputs = [ coq ];
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2015-05-28 15:09:05 +01:00
|
|
|
inherit patches;
|
2015-04-24 17:51:05 +01:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
# Permit building of the ssrcoq statically-bound executable
|
|
|
|
sed -i 's/^#-custom/-custom/' Make
|
|
|
|
sed -i 's/^#SSRCOQ/SSRCOQ/' Make
|
|
|
|
'';
|
|
|
|
|
2015-05-28 15:09:05 +01:00
|
|
|
buildFlags = stdenv.lib.optionalString withDoc "doc";
|
|
|
|
|
2015-04-24 17:51:05 +01:00
|
|
|
installFlags = "COQLIB=$(out)/lib/coq/${coq.coq-version}/";
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cp -p bin/ssrcoq $out/bin
|
|
|
|
cp -p bin/ssrcoq.byte $out/bin
|
2015-05-28 15:09:05 +01:00
|
|
|
'' + stdenv.lib.optionalString withDoc ''
|
|
|
|
mkdir -p $out/share/doc/coq/${coq.coq-version}/user-contrib/Ssreflect/
|
|
|
|
cp -r html $out/share/doc/coq/${coq.coq-version}/user-contrib/Ssreflect/
|
2015-04-24 17:51:05 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = http://ssr.msr-inria.inria.fr/;
|
|
|
|
license = licenses.cecill-b;
|
|
|
|
maintainers = with maintainers; [ vbgl jwiegley ];
|
|
|
|
platforms = coq.meta.platforms;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|