nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix

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 ··· 31 22 + -I $(CAMLP4) pa_tryfinally310.ml && \ 32 23 cp pa_tryfinally310.cmo pa_tryfinally.cmo && \ 33 24 cp pa_tryfinally310.cmi pa_tryfinally.cmi 25 + 26 + --- a/main.ml 2014-11-08 09:05:12.516401313 +0000 27 + +++ b/main.ml 2014-11-08 09:09:59.801311230 +0000 28 + @@ -250,9 +250,15 @@ 29 + Sys.getcwd ()) 30 + | `File script_name -> "", get_dir script_name in 31 + 32 + + let findlibdir = 33 + + Filename.( 34 + + concat (Findlib.package_directory "findlib") parent_dir_name 35 + + ) in 36 + + 37 + let file, oc = Filename.open_temp_file "meta" ".ml" in 38 + fprintf oc "\ 39 + #%i %S;; 40 + +#directory \"%s\";; 41 + #use \"topfind\";; 42 + #require \"ocamlscript\";; 43 + Ocamlscript.Common.verbose := %s;; 44 + @@ -261,7 +267,7 @@ 45 + open Ocamlscript;; 46 + open Utils;; 47 + #%i %S;;\n" 48 + - pos source verbose script_dir extra_args trash pos source; 49 + + pos source findlibdir verbose script_dir extra_args trash pos source; 50 + 51 + List.iter (output_line oc) lines; 52 + 53 + @@ -544,6 +550,7 @@ 54 + exit compilation_status 55 + 56 + let _ = 57 + + Findlib.init (); 58 + try main () 59 + with Failure s -> 60 + eprintf "ocamlscript: %s\n%!" s; 34 61
+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