diff --git a/pkgs/applications/science/logic/coq/default.nix b/pkgs/applications/science/logic/coq/default.nix index 2488147d2145..774fbadd4fd3 100644 --- a/pkgs/applications/science/logic/coq/default.nix +++ b/pkgs/applications/science/logic/coq/default.nix @@ -8,6 +8,7 @@ { stdenv, fetchFromGitHub, writeText, pkgconfig , ocamlPackages, ncurses , buildIde ? true +, glib, gnome3, wrapGAppsHook , csdp ? null , version }: @@ -26,12 +27,15 @@ let "8.8.1" = "1hlf58gwazywbmfa48219amid38vqdl94yz21i11b4map6jfwhbk"; "8.8.2" = "1lip3xja924dm6qblisk1bk0x8ai24s5xxqxphbdxj6djglj68fd"; "8.9.0" = "1dkgdjc4n1m15m1p724hhi5cyxpqbjw6rxc5na6fl3v4qjjfnizh"; + "8.10+beta1" = "19wf39i0ap2vakglgdlqxpjd3l1h5w7dp460w8y7nc1y06b2153h"; }."${version}"; coq-version = let inherit (builtins) concatStringsSep head map; in let inherit (stdenv.lib) take splitString; in concatStringsSep "." (take 2 (map head (map (splitString "pl") (splitString "." version)))); - ideFlags = if buildIde then "-lablgtkdir ${ocamlPackages.lablgtk}/lib/ocaml/*/site-lib/lablgtk2 -coqide opt" else ""; + versionAtLeast = stdenv.lib.versionAtLeast coq-version; + ideFlags = stdenv.lib.optionalString (buildIde && !versionAtLeast "8.10") + "-lablgtkdir ${ocamlPackages.lablgtk}/lib/ocaml/*/site-lib/lablgtk2 -coqide opt"; csdpPatch = if csdp != null then '' substituteInPlace plugins/micromega/sos.ml --replace "; csdp" "; ${csdp}/bin/csdp" substituteInPlace plugins/micromega/coq_micromega.ml --replace "System.is_in_system_path \"csdp\"" "true" @@ -99,7 +103,10 @@ self = stdenv.mkDerivation { nativeBuildInputs = [ pkgconfig ]; buildInputs = [ ncurses ] ++ (with ocamlPackages; [ ocaml findlib camlp5 num ]) - ++ stdenv.lib.optional buildIde ocamlPackages.lablgtk; + ++ stdenv.lib.optionals buildIde + (if versionAtLeast "8.10" + then [ ocamlPackages.lablgtk3-sourceview3 glib gnome3.defaultIconTheme wrapGAppsHook ] + else [ ocamlPackages.lablgtk ]); postPatch = '' UNAME=$(type -tp uname) @@ -120,7 +127,9 @@ self = stdenv.mkDerivation { addEnvHooks "$targetOffset" addCoqPath ''; - preConfigure = '' + preConfigure = if versionAtLeast "8.10" then '' + patchShebangs dev/tools/ + '' else '' configureFlagsArray=( ${ideFlags} ) diff --git a/pkgs/development/coq-modules/Cheerios/default.nix b/pkgs/development/coq-modules/Cheerios/default.nix index 2429ccf3cf60..d58f65102190 100644 --- a/pkgs/development/coq-modules/Cheerios/default.nix +++ b/pkgs/development/coq-modules/Cheerios/default.nix @@ -27,6 +27,6 @@ stdenv.mkDerivation rec { installFlags = "COQLIB=$(out)/lib/coq/${coq.coq-version}/"; passthru = { - compatibleCoqVersions = v: stdenv.lib.versionAtLeast v "8.6"; + compatibleCoqVersions = v: builtins.elem v [ "8.6" "8.7" "8.8" "8.9" ]; }; } diff --git a/pkgs/development/coq-modules/InfSeqExt/default.nix b/pkgs/development/coq-modules/InfSeqExt/default.nix index 6b908f5a09a3..4fe86c3fae18 100644 --- a/pkgs/development/coq-modules/InfSeqExt/default.nix +++ b/pkgs/development/coq-modules/InfSeqExt/default.nix @@ -26,6 +26,6 @@ stdenv.mkDerivation rec { installFlags = "COQLIB=$(out)/lib/coq/${coq.coq-version}/"; passthru = { - compatibleCoqVersions = v: stdenv.lib.versionAtLeast v "8.5"; + compatibleCoqVersions = v: builtins.elem v [ "8.5" "8.6" "8.7" "8.8" "8.9" ]; }; } diff --git a/pkgs/development/coq-modules/Verdi/default.nix b/pkgs/development/coq-modules/Verdi/default.nix index 9b3b5320c8ed..00d088a4a92c 100644 --- a/pkgs/development/coq-modules/Verdi/default.nix +++ b/pkgs/development/coq-modules/Verdi/default.nix @@ -32,6 +32,6 @@ stdenv.mkDerivation rec { installFlags = "COQLIB=$(out)/lib/coq/${coq.coq-version}/"; passthru = { - compatibleCoqVersions = v: stdenv.lib.versionAtLeast v "8.6"; + compatibleCoqVersions = v: builtins.elem v [ "8.6" "8.7" "8.8" "8.9" ]; }; } diff --git a/pkgs/development/coq-modules/corn/default.nix b/pkgs/development/coq-modules/corn/default.nix index dc0f0873d07e..e5fa11c5cad4 100644 --- a/pkgs/development/coq-modules/corn/default.nix +++ b/pkgs/development/coq-modules/corn/default.nix @@ -32,7 +32,7 @@ stdenv.mkDerivation rec { }; passthru = { - compatibleCoqVersions = v: stdenv.lib.versionAtLeast v "8.6"; + compatibleCoqVersions = v: builtins.elem v [ "8.6" "8.7" "8.8" "8.9" ]; }; } diff --git a/pkgs/development/coq-modules/math-classes/default.nix b/pkgs/development/coq-modules/math-classes/default.nix index 364366ced497..0fa17e292faa 100644 --- a/pkgs/development/coq-modules/math-classes/default.nix +++ b/pkgs/development/coq-modules/math-classes/default.nix @@ -24,7 +24,7 @@ stdenv.mkDerivation rec { }; passthru = { - compatibleCoqVersions = v: stdenv.lib.versionAtLeast v "8.6"; + compatibleCoqVersions = v: builtins.elem v [ "8.6" "8.7" "8.8" "8.9" ]; }; } diff --git a/pkgs/development/coq-modules/mathcomp/default.nix b/pkgs/development/coq-modules/mathcomp/default.nix index 8b4c74fb1a54..85678a4c6a96 100644 --- a/pkgs/development/coq-modules/mathcomp/default.nix +++ b/pkgs/development/coq-modules/mathcomp/default.nix @@ -64,7 +64,7 @@ stdenv.mkDerivation rec { }; passthru = { - compatibleCoqVersions = v: stdenv.lib.versionAtLeast v "8.5"; + compatibleCoqVersions = v: builtins.elem v [ "8.5" "8.6" "8.7" "8.8" "8.9" ]; }; } diff --git a/pkgs/development/coq-modules/simple-io/default.nix b/pkgs/development/coq-modules/simple-io/default.nix index 6ed343952f21..e685de4e9741 100644 --- a/pkgs/development/coq-modules/simple-io/default.nix +++ b/pkgs/development/coq-modules/simple-io/default.nix @@ -28,7 +28,7 @@ stdenv.mkDerivation rec { }; passthru = { - compatibleCoqVersions = v: stdenv.lib.versionAtLeast v "8.7"; + compatibleCoqVersions = v: builtins.elem v [ "8.7" "8.8" "8.9" ]; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4b97691339f2..f2dab6fdba34 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -22457,6 +22457,7 @@ in coqPackages_8_7 coq_8_7 coqPackages_8_8 coq_8_8 coqPackages_8_9 coq_8_9 + coqPackages_8_10 coq_8_10 coqPackages coq ; diff --git a/pkgs/top-level/coq-packages.nix b/pkgs/top-level/coq-packages.nix index 2659a3302025..ace2c5f21384 100644 --- a/pkgs/top-level/coq-packages.nix +++ b/pkgs/top-level/coq-packages.nix @@ -97,12 +97,16 @@ in rec { coq_8_9 = callPackage ../applications/science/logic/coq { version = "8.9.0"; }; + coq_8_10 = callPackage ../applications/science/logic/coq { + version = "8.10+beta1"; + }; coqPackages_8_5 = mkCoqPackages coq_8_5; coqPackages_8_6 = mkCoqPackages coq_8_6; coqPackages_8_7 = mkCoqPackages coq_8_7; coqPackages_8_8 = mkCoqPackages coq_8_8; coqPackages_8_9 = mkCoqPackages coq_8_9; + coqPackages_8_10 = mkCoqPackages coq_8_10; coqPackages = recurseIntoAttrs (lib.mapDerivationAttrset lib.dontDistribute coqPackages_8_8 );