nixpkgs/pkgs/applications/science/logic/hol_light/parser_setup.patch
Marco Maggesi 4e5db40581 Update HOL Light to version 20100820 (rev57 on google code).
Also replace the monolitic derivation hol_light_binaries with smaller
derivations.  Now the installation works as follows:

# Install the base system and a script "start_hol_light"
$ nix-env -i hol_light_sources hol_light

# Install a checkpointed executable with the core library preloaded
$ nix-env -i hol_light_core_dmtcp

# Install HOL Light binaries preloaded with other specific libraries:
$ nix-env -i hol_light_multivariate_dmtcp
$ nix-env -i hol_light_complex_dmtcp
$ nix-env -i hol_light_sosa_dmtcp
$ nix-env -i hol_light_card_dmtcp


svn path=/nixpkgs/trunk/; revision=23815
2010-09-15 21:41:18 +00:00

36 lines
1.6 KiB
Diff

diff -Nuar hol_light/hol.ml hol_light.nixos/hol.ml
--- hol_light/hol.ml 2010-09-12 18:57:28.000000000 +0200
+++ hol_light.nixos/hol.ml 2010-09-12 19:09:09.000000000 +0200
@@ -11,8 +11,8 @@
let hol_version = "2.20++";;
-let hol_dir = ref
- (try Sys.getenv "HOLLIGHT_DIR" with Not_found -> Sys.getcwd());;
+let hol_dir = ref "@HOL_LIGHT_SRC_DIR@";;
+Topdirs.dir_directory "@HOL_LIGHT_SRC_DIR@";;
(* ------------------------------------------------------------------------- *)
(* Should eventually change to "ref(Filename.temp_dir_name)". *)
@@ -23,20 +23,6 @@
let temp_path = ref "/tmp";;
(* ------------------------------------------------------------------------- *)
-(* Load in parsing extensions. *)
-(* For Ocaml < 3.10, use the built-in camlp4 *)
-(* and for Ocaml >= 3.10, use camlp5 instead. *)
-(* ------------------------------------------------------------------------- *)
-
-if let v = String.sub Sys.ocaml_version 0 4 in
- v = "3.10" or v = "3.11"
-then (Topdirs.dir_directory "+camlp5";
- Topdirs.dir_load Format.std_formatter "camlp5o.cma")
-else (Topdirs.dir_load Format.std_formatter "camlp4o.cma");;
-
-Topdirs.dir_load Format.std_formatter (Filename.concat (!hol_dir) "pa_j.cmo");;
-
-(* ------------------------------------------------------------------------- *)
(* Load files from system and/or user-settable directories. *)
(* Paths map initial "$/" to !hol_dir dynamically; use $$ to get the actual *)
(* $ character at the start of a directory. *)