push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,66 @@
From: Stephane Glondu <steph@glondu.net>
Date: Wed, 12 Feb 2020 05:42:32 +0100
Subject: Fix compilation with camlp5 7.11
---
pa_j_4.xx_7.xx.ml | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/pa_j_4.xx_7.xx.ml b/pa_j_4.xx_7.xx.ml
index 4f7ed60..e834058 100755
--- a/pa_j/pa_j_4.xx_7.xx.ml
+++ b/pa_j/pa_j_4.xx_7.xx.ml
@@ -410,9 +410,10 @@ and reloc_module_type floc sh =
| MtApp loc x1 x2 →
let loc = floc loc in
MtApp loc (self x1) (self x2)
- | MtFun loc x1 x2 x3 →
+ | MtFun loc x x3 →
let loc = floc loc in
- MtFun loc x1 (self x2) (self x3)
+ let x = vala_map (option_map (fun (x1, x2) -> (x1, self x2))) x in
+ MtFun loc x (self x3)
| MtLid loc x1 →
let loc = floc loc in
MtLid loc x1
@@ -507,9 +508,10 @@ and reloc_module_expr floc sh =
| MeApp loc x1 x2 →
let loc = floc loc in
MeApp loc (self x1) (self x2)
- | MeFun loc x1 x2 x3 →
+ | MeFun loc x x3 →
let loc = floc loc in
- MeFun loc x1 (reloc_module_type floc sh x2) (self x3)
+ let x = vala_map (option_map (fun (x1, x2) -> (x1, reloc_module_type floc sh x2))) x in
+ MeFun loc x (self x3)
| MeStr loc x1 →
let loc = floc loc in
MeStr loc (vala_map (List.map (reloc_str_item floc sh)) x1)
@@ -2007,7 +2009,7 @@ EXTEND
| -> <:vala< [] >> ] ]
;
mod_binding:
- [ [ i = V UIDENT; me = mod_fun_binding -> (i, me) ] ]
+ [ [ i = V uidopt "uidopt"; me = mod_fun_binding -> (i, me) ] ]
;
mod_fun_binding:
[ RIGHTA
@@ -2070,7 +2072,7 @@ EXTEND
<:sig_item< value $lid:i$ : $t$ >> ] ]
;
mod_decl_binding:
- [ [ i = V UIDENT; mt = module_declaration -> (i, mt) ] ]
+ [ [ i = V uidopt "uidopt"; mt = module_declaration -> (i, mt) ] ]
;
module_declaration:
[ RIGHTA
@@ -2092,6 +2094,9 @@ EXTEND
| "module"; i = V mod_ident ""; ":="; me = module_expr ->
<:with_constr< module $_:i$ := $me$ >> ] ]
;
+ uidopt:
+ [ [ m = V UIDENT -> Some m ] ]
+ ;
(* Core expressions *)
expr:
[ "top" RIGHTA

View File

@@ -0,0 +1,85 @@
{
lib,
stdenv,
runtimeShell,
fetchFromGitHub,
ocaml,
findlib,
num,
zarith,
camlp5,
camlp-streams,
}:
let
use_zarith = lib.versionAtLeast ocaml.version "4.14";
load_num =
if use_zarith then
''
-I ${zarith}/lib/ocaml/${ocaml.version}/site-lib/zarith \
-I ${zarith}/lib/ocaml/${ocaml.version}/site-lib/stublibs \
''
else
lib.optionalString (num != null) ''
-I ${num}/lib/ocaml/${ocaml.version}/site-lib/num \
-I ${num}/lib/ocaml/${ocaml.version}/site-lib/top-num \
-I ${num}/lib/ocaml/${ocaml.version}/site-lib/stublibs \
'';
start_script = ''
#!${runtimeShell}
cd $out/lib/hol_light
export OCAMLPATH="''${OCAMLPATH-}''${OCAMLPATH:+:}${camlp5}/lib/ocaml/${ocaml.version}/site-lib/"
exec ${ocaml}/bin/ocaml \
-I \`${camlp5}/bin/camlp5 -where\` \
${load_num} \
-I ${findlib}/lib/ocaml/${ocaml.version}/site-lib/ \
-I ${camlp-streams}/lib/ocaml/${ocaml.version}/site-lib/camlp-streams camlp_streams.cma \
-init make.ml
'';
in
stdenv.mkDerivation {
pname = "hol_light";
version = "unstable-2024-07-07";
src = fetchFromGitHub {
owner = "jrh13";
repo = "hol-light";
rev = "16b184e30e7e3fe9add7d1ee93242323ed2e1726";
hash = "sha256-V0OtsmX5pa+CH3ZXmNG3juXwXZ5+A0k13eMCAfaRziQ=";
};
patches = [ ./0004-Fix-compilation-with-camlp5-7.11.patch ];
strictDeps = true;
nativeBuildInputs = [
ocaml
findlib
camlp5
];
propagatedBuildInputs = [
camlp-streams
(if use_zarith then zarith else num)
];
installPhase = ''
mkdir -p "$out/lib/hol_light" "$out/bin"
cp -a . $out/lib/hol_light
echo "${start_script}" > "$out/bin/hol_light"
chmod a+x "$out/bin/hol_light"
'';
meta = with lib; {
description = "Interactive theorem prover based on Higher-Order Logic";
homepage = "http://www.cl.cam.ac.uk/~jrh13/hol-light/";
license = licenses.bsd2;
platforms = platforms.unix;
maintainers = with maintainers; [
thoughtpolice
maggesi
vbgl
];
};
}