2019-07-31 09:40:10 +00:00
|
|
|
{ stdenv, bash, which, autoconf, automake, fetchzip, coq }:
|
2019-01-19 06:44:47 +00:00
|
|
|
|
|
|
|
let params =
|
|
|
|
if stdenv.lib.versionAtLeast coq.coq-version "8.7" then {
|
2020-06-07 13:58:42 +00:00
|
|
|
version = "3.3.1";
|
|
|
|
sha256 = "0k1nfgiszmai5dihhpfa5mgq9rwigl0n38dw10jn79x89xbdpyh5";
|
2019-01-19 06:44:47 +00:00
|
|
|
} else {
|
|
|
|
version = "2.6.1";
|
2020-06-07 13:58:42 +00:00
|
|
|
sha256 = "0q5a038ww5dn72yvwn5298d3ridkcngb1dik8hdyr3xh7gr5qibj";
|
2019-01-19 06:44:47 +00:00
|
|
|
}
|
|
|
|
; in
|
2014-10-21 05:23:36 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
|
2017-01-14 14:52:03 +00:00
|
|
|
name = "coq${coq.coq-version}-flocq-${version}";
|
2019-01-19 06:44:47 +00:00
|
|
|
inherit (params) version;
|
2014-10-21 05:23:36 +00:00
|
|
|
|
2019-07-31 09:40:10 +00:00
|
|
|
src = fetchzip {
|
|
|
|
url = "https://gitlab.inria.fr/flocq/flocq/-/archive/flocq-${version}.tar.gz";
|
2019-01-19 06:44:47 +00:00
|
|
|
inherit (params) sha256;
|
2014-10-21 05:23:36 +00:00
|
|
|
};
|
|
|
|
|
2019-01-19 06:44:47 +00:00
|
|
|
nativeBuildInputs = [ bash which autoconf automake ];
|
|
|
|
buildInputs = [ coq ] ++ (with coq.ocamlPackages; [
|
|
|
|
ocaml camlp5
|
|
|
|
]);
|
2014-10-21 05:23:36 +00:00
|
|
|
|
|
|
|
buildPhase = ''
|
2020-06-07 13:58:42 +00:00
|
|
|
${bash}/bin/bash autogen.sh || autoconf
|
2014-10-21 05:23:36 +00:00
|
|
|
${bash}/bin/bash configure --libdir=$out/lib/coq/${coq.coq-version}/user-contrib/Flocq
|
|
|
|
./remake
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
./remake install
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "http://flocq.gforge.inria.fr/";
|
2015-04-30 15:05:14 +00:00
|
|
|
description = "A floating-point formalization for the Coq system";
|
2014-12-07 12:14:08 +00:00
|
|
|
license = licenses.lgpl3;
|
2014-10-21 05:23:36 +00:00
|
|
|
maintainers = with maintainers; [ jwiegley ];
|
|
|
|
platforms = coq.meta.platforms;
|
|
|
|
};
|
|
|
|
|
2019-01-19 06:44:47 +00:00
|
|
|
passthru = {
|
2020-06-07 13:58:42 +00:00
|
|
|
compatibleCoqVersions = v: builtins.elem v [ "8.5" "8.6" "8.7" "8.8" "8.9" "8.10" "8.11" "8.12" ];
|
2019-01-19 06:44:47 +00:00
|
|
|
};
|
2014-10-21 05:23:36 +00:00
|
|
|
}
|