2018-10-19 10:25:09 +02:00
|
|
|
{ stdenv, fetchFromGitHub, autoreconfHook, coq }:
|
2017-01-12 22:23:18 +01:00
|
|
|
|
2018-03-21 15:00:47 +01:00
|
|
|
let params = {
|
2020-03-10 13:19:29 +01:00
|
|
|
"8.11" = {
|
|
|
|
version = "0.6.7";
|
|
|
|
sha256 = "01vpi7scvkl4ls1z2k2x9zd65wflzb667idj759859hlz3ps9z09";
|
|
|
|
};
|
|
|
|
"8.10" = {
|
|
|
|
version = "0.6.6";
|
|
|
|
sha256 = "1gjrm5zjzw4cisiwdr5b3iqa7s4cssa220xr0k96rwgk61rcjd8w";
|
|
|
|
};
|
|
|
|
"8.9" = {
|
|
|
|
version = "0.6.5";
|
|
|
|
sha256 = "1f34z24yg05b1096gqv36jr3vffkcjkf9qncii3pzhhvagxd0w2f";
|
|
|
|
};
|
2018-05-02 17:14:22 +02:00
|
|
|
"8.8" = {
|
|
|
|
version = "0.6.3";
|
|
|
|
rev = "0acbd0a594c7e927574d5f212cc73a486b5305d2";
|
|
|
|
sha256 = "0c95b0bz2kjm6swr5na4gs06lxxywradszxbr5ldh2zx02r3f3rx";
|
|
|
|
};
|
2017-11-12 17:49:09 +01:00
|
|
|
"8.7" = {
|
|
|
|
version = "0.6.2";
|
|
|
|
rev = "d76ddde37d918569945774733b7997e8b24daf51";
|
|
|
|
sha256 = "04lnf4b25yarysj848cfl8pd3i3pr3818acyp9hgwdgd1rqmhjwm";
|
|
|
|
};
|
2017-01-12 22:23:18 +01:00
|
|
|
"8.6" = {
|
|
|
|
version = "0.6.1";
|
|
|
|
rev = "c3b87af6bfa338e18b83f014ebd0e56e1f611663";
|
|
|
|
sha256 = "1jaafkwsb5450378nprjsds1illgdaq60gryi8kspw0i25ykz2c9";
|
|
|
|
};
|
|
|
|
"8.5" = {
|
|
|
|
version = "0.6";
|
|
|
|
sha256 = "0qvar8gfbrcs9fmvkph5asqz4l5fi63caykx3bsn8zf0xllkwv0n";
|
|
|
|
};
|
2018-03-21 15:00:47 +01:00
|
|
|
};
|
2019-08-13 23:52:01 +02:00
|
|
|
param = params.${coq.coq-version};
|
2018-03-21 15:00:47 +01:00
|
|
|
in
|
2016-05-02 09:53:29 +02:00
|
|
|
|
2020-04-06 08:39:01 +02:00
|
|
|
let hasWarning = stdenv.lib.versionAtLeast coq.ocamlPackages.ocaml.version "4.08"; in
|
|
|
|
|
2016-05-02 09:53:29 +02:00
|
|
|
stdenv.mkDerivation {
|
2017-01-12 22:23:18 +01:00
|
|
|
name = "coq${coq.coq-version}-dpdgraph-${param.version}";
|
2016-05-02 09:53:29 +02:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Karmaki";
|
|
|
|
repo = "coq-dpdgraph";
|
2020-03-10 13:19:29 +01:00
|
|
|
rev = param.rev or "v${param.version}";
|
|
|
|
inherit (param) sha256;
|
2016-05-02 09:53:29 +02:00
|
|
|
};
|
|
|
|
|
2017-09-05 23:26:13 +02:00
|
|
|
nativeBuildInputs = [ autoreconfHook ];
|
2018-10-19 10:25:09 +02:00
|
|
|
buildInputs = [ coq ]
|
|
|
|
++ (with coq.ocamlPackages; [ ocaml camlp5 findlib ocamlgraph ]);
|
2016-05-02 09:53:29 +02:00
|
|
|
|
2020-04-06 08:39:01 +02:00
|
|
|
# dpd_compute.ml uses deprecated Pervasives.compare
|
|
|
|
# Versions prior to 0.6.5 do not have the WARN_ERR build flag
|
|
|
|
preConfigure = stdenv.lib.optionalString hasWarning ''
|
|
|
|
substituteInPlace Makefile.in --replace "-warn-error +a " ""
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildFlags = stdenv.lib.optional hasWarning "WARN_ERR=";
|
|
|
|
|
2016-05-02 09:53:29 +02:00
|
|
|
preInstall = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
'';
|
|
|
|
|
2019-11-05 02:10:31 +01:00
|
|
|
installFlags = [
|
|
|
|
"COQLIB=$(out)/lib/coq/${coq.coq-version}/"
|
|
|
|
"BINDIR=$(out)/bin"
|
|
|
|
];
|
2016-05-02 09:53:29 +02:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Build dependency graphs between Coq objects";
|
|
|
|
license = stdenv.lib.licenses.lgpl21;
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://github.com/Karmaki/coq-dpdgraph/";
|
2016-05-02 09:53:29 +02:00
|
|
|
maintainers = with stdenv.lib.maintainers; [ vbgl ];
|
|
|
|
platforms = coq.meta.platforms;
|
|
|
|
};
|
2018-03-21 15:00:47 +01:00
|
|
|
|
|
|
|
passthru = {
|
|
|
|
compatibleCoqVersions = v: builtins.hasAttr v params;
|
|
|
|
};
|
|
|
|
|
2016-05-02 09:53:29 +02:00
|
|
|
}
|