rocqPackages.micromega-plugin: init at 1.0.0

This commit is contained in:
Pierre Roux
2025-10-17 14:28:43 +02:00
parent 01aee8adce
commit 2a7a765c10
2 changed files with 56 additions and 0 deletions

View File

@@ -0,0 +1,55 @@
{
lib,
mkRocqDerivation,
rocq-core,
version ? null,
}:
mkRocqDerivation {
pname = "micromega-plugin";
owner = "rocq-community";
inherit version;
defaultVersion =
let
case = case: out: { inherit case out; };
in
with lib.versions;
lib.switch rocq-core.rocq-version [
(case (range "9.0" "9.2") "1.0.0")
] null;
release = {
"1.0.0".sha256 = "sha256-srDOrGC4h21O9MIHfmOMJ0BKQhamaWyzQT72TwgfDYc=";
};
releaseRev = v: "v${v}";
mlPlugin = true;
useDune = true;
nativeBuildInputs = [
rocq-core.ocamlPackages.ppx_optcomp
];
propagatedBuildInputs = [
rocq-core.ocamlPackages.findlib
];
configurePhase = ''
patchShebangs etc/with-rocq-wrap.sh
'';
buildPhase = ''
etc/with-rocq-wrap.sh dune build -p micromega-plugin @install ''${enableParallelBuilding:+-j $NIX_BUILD_CORES}
'';
installPhase = ''
etc/with-rocq-wrap.sh dune install --root . micromega-plugin --prefix=$out --libdir $OCAMLFIND_DESTDIR
mkdir $out/lib/coq/
mv $OCAMLFIND_DESTDIR/coq $out/lib/coq/${rocq-core.rocq-version}
'';
meta = {
description = "Plugin for (semi)decision procedures for arithmetic.";
license = lib.licenses.lgpl21;
};
}

View File

@@ -57,6 +57,7 @@ let
mathcomp-finmap = callPackage ../development/rocq-modules/mathcomp-finmap { };
mathcomp-reals = self.mathcomp-analysis.reals;
mathcomp-reals-stdlib = self.mathcomp-analysis.reals-stdlib;
micromega-plugin = callPackage ../development/rocq-modules/micromega-plugin { };
parseque = callPackage ../development/rocq-modules/parseque { };
relation-algebra = callPackage ../development/rocq-modules/relation-algebra { };
rocq-elpi = callPackage ../development/rocq-modules/rocq-elpi { };