diff options
Diffstat (limited to 'pkgs/development/coq-modules/coqprime/default.nix')
-rw-r--r-- | pkgs/development/coq-modules/coqprime/default.nix | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/pkgs/development/coq-modules/coqprime/default.nix b/pkgs/development/coq-modules/coqprime/default.nix new file mode 100644 index 000000000000..54cb7c50e407 --- /dev/null +++ b/pkgs/development/coq-modules/coqprime/default.nix @@ -0,0 +1,46 @@ +{ stdenv, fetchFromGitHub, coq, bignums }: + +let params = + { + "8.7" = { + version = "8.7.2"; + sha256 = "15zlcrx06qqxjy3nhh22wzy0rb4npc8l4nx2bbsfsvrisbq1qb7k"; + }; + "8.8" = { + version = "8.8"; + sha256 = "075yjczk79pf1hd3lgdjiz84ilkzfxjh18lgzrhhqp7d3kz5lxp5"; + }; + }; + param = params."${coq.coq-version}" +; in + +stdenv.mkDerivation rec { + + inherit (param) version; + name = "coq${coq.coq-version}-coqprime-${version}"; + + src = fetchFromGitHub { + owner = "thery"; + repo = "coqprime"; + rev = "v${version}"; + inherit (param) sha256; + }; + + buildInputs = [ coq ]; + + propagatedBuildInputs = [ bignums ]; + + installFlags = "COQLIB=$(out)/lib/coq/${coq.coq-version}/"; + + meta = with stdenv.lib; { + description = "Library to certify primality using Pocklington certificate and Elliptic Curve Certificate"; + license = licenses.lgpl21; + maintainers = [ stdenv.lib.maintainers.vbgl ]; + inherit (coq.meta) platforms; + inherit (src.meta) homepage; + }; + + passthru = { + compatibleCoqVersions = v: builtins.hasAttr v params; + }; +} |