Something went wrong. Try again.
lol
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126{ lib, mkRocqDerivation, mathcomp, mathcomp-finmap, mathcomp-bigenough, stdlib, single ? false, rocq-core, version ? null,}@args:
let repo = "analysis"; owner = "math-comp";
release."1.16.0".sha256 = "sha256-L0dCbxEqxI8rFv6OOEoIT/U3GKX37ageU9yw2H6hrWY=";
defaultVersion = let case = rocq: mc: out: { cases = [ rocq mc ]; inherit out; }; in with lib.versions; lib.switch [ rocq-core.rocq-version mathcomp.version ] [ (case (range "9.0" "9.1") (range "2.4.0" "2.5.0") "1.16.0") ] null;
# list of analysis packages sorted by dependency order packages = { "classical" = [ ]; "reals" = [ "classical" ]; "experimental-reals" = [ "reals" ]; "analysis" = [ "reals" ]; "reals-stdlib" = [ "reals" ]; "analysis-stdlib" = [ "analysis" "reals-stdlib" ]; };
mathcomp_ = package: let classical-deps = [ mathcomp.algebra mathcomp-finmap ]; experimental-reals-deps = [ mathcomp-bigenough ]; analysis-deps = [ mathcomp.field mathcomp-bigenough ]; intra-deps = lib.optionals (package != "single") (map mathcomp_ packages.${package}); pkgpath = let case = case: out: { inherit case out; }; in lib.switch package [ (case "single" ".") (case "analysis" "theories") (case "experimental-reals" "experimental_reals") (case "reals-stdlib" "reals_stdlib") (case "analysis-stdlib" "analysis_stdlib") ] package; pname = if package == "single" then "mathcomp-analysis-single" else "mathcomp-${package}"; derivation = mkRocqDerivation { inherit version pname defaultVersion release repo owner ;
namePrefix = [ "rocq-core" "mathcomp" ];
propagatedBuildInputs = intra-deps ++ lib.optionals (lib.elem package [ "classical" "single" ]) classical-deps ++ lib.optionals (lib.elem package [ "experimental-reals" "single" ]) experimental-reals-deps ++ lib.optionals (lib.elem package [ "analysis" "single" ]) analysis-deps ++ lib.optional (lib.elem package [ "reals-stdlib" "analysis-stdlib" "single" ]) stdlib;
preBuild = '' cd ${pkgpath} '';
meta = { description = "Analysis library compatible with Mathematical Components"; maintainers = [ lib.maintainers.cohencyril ]; license = lib.licenses.cecill-c; };
passthru = lib.mapAttrs (package: deps: mathcomp_ package) packages; }; in derivation;inmathcomp_ (if single then "single" else "analysis")