lol

Fixes ocamlscript

+46 -1
+45
pkgs/development/tools/ocaml/ocamlscript/Makefile.patch
··· 9 9 STDBIN = $(shell dirname `which ocamlfind`) 10 10 ifndef PREFIX 11 11 PREFIX = $(shell dirname $(STDBIN)) 12 + @@ -15,7 +17,7 @@ 13 + endif 14 + export BINDIR 15 + 16 + -PACKS = unix str 17 + +PACKS = unix str findlib 18 + PP = camlp4o -I . -parser pa_tryfinally.cmo -parser pa_opt.cmo 19 + export PP 20 + 12 21 @@ -36,11 +38,11 @@ 13 22 14 23 common: version.ml ··· 23 32 cp pa_tryfinally310.cmo pa_tryfinally.cmo && \ 24 33 cp pa_tryfinally310.cmi pa_tryfinally.cmi 25 34 35 + --- a/main.ml 2014-11-08 09:05:12.516401313 +0000 36 + +++ b/main.ml 2014-11-08 09:09:59.801311230 +0000 37 + @@ -250,9 +250,15 @@ 38 + Sys.getcwd ()) 39 + | `File script_name -> "", get_dir script_name in 40 + 41 + + let findlibdir = 42 + + Filename.( 43 + + concat (Findlib.package_directory "findlib") parent_dir_name 44 + + ) in 45 + + 46 + let file, oc = Filename.open_temp_file "meta" ".ml" in 47 + fprintf oc "\ 48 + #%i %S;; 49 + +#directory \"%s\";; 50 + #use \"topfind\";; 51 + #require \"ocamlscript\";; 52 + Ocamlscript.Common.verbose := %s;; 53 + @@ -261,7 +267,7 @@ 54 + open Ocamlscript;; 55 + open Utils;; 56 + #%i %S;;\n" 57 + - pos source verbose script_dir extra_args trash pos source; 58 + + pos source findlibdir verbose script_dir extra_args trash pos source; 59 + 60 + List.iter (output_line oc) lines; 61 + 62 + @@ -544,6 +550,7 @@ 63 + exit compilation_status 64 + 65 + let _ = 66 + + Findlib.init (); 67 + try main () 68 + with Failure s -> 69 + eprintf "ocamlscript: %s\n%!" s; 70 +
+1 -1
pkgs/development/tools/ocaml/ocamlscript/default.nix
··· 6 6 sha256 = "1v1i24gijxwris8w4hi95r9swld6dm7jbry0zp72767a3g5ivlrd"; 7 7 }; 8 8 9 - buildInputs = [ ocaml findlib camlp4 ]; 9 + propagatedBuildInputs = [ ocaml findlib camlp4 ]; 10 10 11 11 patches = [ ./Makefile.patch ]; 12 12