From 58c1ab9158216fe13ec1cd7f7384d32fdaeea3a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20Zimmermann?= Date: Tue, 17 Aug 2021 10:40:13 +0200 Subject: [PATCH] coqPackages.addition-chains: init at 0.4 --- .../coq-modules/addition-chains/default.nix | 33 +++++++++++++++++++ pkgs/top-level/coq-packages.nix | 1 + 2 files changed, 34 insertions(+) create mode 100644 pkgs/development/coq-modules/addition-chains/default.nix diff --git a/pkgs/development/coq-modules/addition-chains/default.nix b/pkgs/development/coq-modules/addition-chains/default.nix new file mode 100644 index 000000000000..f2ddacf2e308 --- /dev/null +++ b/pkgs/development/coq-modules/addition-chains/default.nix @@ -0,0 +1,33 @@ +{ lib, mkCoqDerivation, coq, mathcomp-ssreflect, mathcomp-algebra, paramcoq +, version ? null }: +with lib; + +mkCoqDerivation { + pname = "addition-chains"; + repo = "hydra-battles"; + + release."0.4".sha256 = "sha256:1f7pc4w3kir4c9p0fjx5l77401bx12y72nmqxrqs3qqd3iynvqlp"; + releaseRev = (v: "v${v}"); + + inherit version; + defaultVersion = with versions; switch coq.coq-version [ + { case = isGe "8.11"; out = "0.4"; } + ] null; + + propagatedBuildInputs = [ mathcomp-ssreflect mathcomp-algebra paramcoq ]; + + useDune2 = true; + + meta = { + description = "Exponentiation algorithms following addition chains"; + longDescription = '' + Addition chains are algorithms for computations of the p-th + power of some x, with the least number of multiplication as + possible. We present a few implementations of addition chains, + with proofs of their correctness. + ''; + maintainers = with maintainers; [ Zimmi48 ]; + license = licenses.mit; + platforms = platforms.unix; + }; +} diff --git a/pkgs/top-level/coq-packages.nix b/pkgs/top-level/coq-packages.nix index 074b8a09708a..63f52fec2cb4 100644 --- a/pkgs/top-level/coq-packages.nix +++ b/pkgs/top-level/coq-packages.nix @@ -14,6 +14,7 @@ let (callPackage ../development/coq-modules/contribs {}); aac-tactics = callPackage ../development/coq-modules/aac-tactics {}; + addition-chains = callPackage ../development/coq-modules/addition-chains {}; autosubst = callPackage ../development/coq-modules/autosubst {}; bignums = if lib.versionAtLeast coq.coq-version "8.6" then callPackage ../development/coq-modules/bignums {}