2019-02-03 14:44:37 +01:00
|
|
|
{ stdenv, fetchFromGitHub, coq, mathcomp }:
|
|
|
|
|
2019-04-16 10:30:14 +02:00
|
|
|
let param =
|
|
|
|
if stdenv.lib.versionAtLeast mathcomp.version "1.8.0"
|
|
|
|
then {
|
|
|
|
version = "1.2.0";
|
|
|
|
sha256 = "0b6wrdr0d7rcnv86s37zm80540jl2wmiyf39ih7mw3dlwli2cyj4";
|
|
|
|
} else {
|
|
|
|
version = "1.1.0";
|
|
|
|
sha256 = "05df59v3na8jhpsfp7hq3niam6asgcaipg2wngnzxzqnl86srp2a";
|
|
|
|
}
|
|
|
|
; in
|
|
|
|
|
2019-02-03 14:44:37 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2019-04-16 10:30:14 +02:00
|
|
|
inherit (param) version;
|
2019-02-03 14:44:37 +01:00
|
|
|
name = "coq${coq.coq-version}-mathcomp-finmap-${version}";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "math-comp";
|
|
|
|
repo = "finmap";
|
|
|
|
rev = version;
|
2019-04-16 10:30:14 +02:00
|
|
|
inherit (param) sha256;
|
2019-02-03 14:44:37 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ coq ];
|
|
|
|
propagatedBuildInputs = [ mathcomp ];
|
|
|
|
|
2019-02-11 17:16:31 +01:00
|
|
|
installFlags = "-f Makefile.coq COQLIB=$(out)/lib/coq/${coq.coq-version}/";
|
2019-02-03 14:44:37 +01:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "A finset and finmap library";
|
|
|
|
inherit (src.meta) homepage;
|
|
|
|
inherit (mathcomp.meta) platforms license;
|
|
|
|
maintainers = [ stdenv.lib.maintainers.vbgl ];
|
|
|
|
};
|
|
|
|
|
|
|
|
passthru = {
|
2019-02-11 17:16:31 +01:00
|
|
|
compatibleCoqVersions = v: builtins.elem v [ "8.6" "8.7" "8.8" "8.9" ];
|
2019-02-03 14:44:37 +01:00
|
|
|
};
|
|
|
|
}
|