tangled
alpha
login
or
join now
tjh.dev
/
nixpkgs
0
fork
atom
nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
0
fork
atom
overview
issues
pulls
pipelines
Fixes ocamlscript
Vincent Laporte
11 years ago
aa2fd47e
cf4a976c
+46
-1
2 changed files
expand all
collapse all
unified
split
pkgs
development
tools
ocaml
ocamlscript
Makefile.patch
default.nix
+45
pkgs/development/tools/ocaml/ocamlscript/Makefile.patch
reviewed
···
9
9
STDBIN = $(shell dirname `which ocamlfind`)
10
10
ifndef PREFIX
11
11
PREFIX = $(shell dirname $(STDBIN))
12
12
+
@@ -15,7 +17,7 @@
13
13
+
endif
14
14
+
export BINDIR
15
15
+
16
16
+
-PACKS = unix str
17
17
+
+PACKS = unix str findlib
18
18
+
PP = camlp4o -I . -parser pa_tryfinally.cmo -parser pa_opt.cmo
19
19
+
export PP
20
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
25
+
26
26
+
--- a/main.ml 2014-11-08 09:05:12.516401313 +0000
27
27
+
+++ b/main.ml 2014-11-08 09:09:59.801311230 +0000
28
28
+
@@ -250,9 +250,15 @@
29
29
+
Sys.getcwd ())
30
30
+
| `File script_name -> "", get_dir script_name in
31
31
+
32
32
+
+ let findlibdir =
33
33
+
+ Filename.(
34
34
+
+ concat (Findlib.package_directory "findlib") parent_dir_name
35
35
+
+ ) in
36
36
+
+
37
37
+
let file, oc = Filename.open_temp_file "meta" ".ml" in
38
38
+
fprintf oc "\
39
39
+
#%i %S;;
40
40
+
+#directory \"%s\";;
41
41
+
#use \"topfind\";;
42
42
+
#require \"ocamlscript\";;
43
43
+
Ocamlscript.Common.verbose := %s;;
44
44
+
@@ -261,7 +267,7 @@
45
45
+
open Ocamlscript;;
46
46
+
open Utils;;
47
47
+
#%i %S;;\n"
48
48
+
- pos source verbose script_dir extra_args trash pos source;
49
49
+
+ pos source findlibdir verbose script_dir extra_args trash pos source;
50
50
+
51
51
+
List.iter (output_line oc) lines;
52
52
+
53
53
+
@@ -544,6 +550,7 @@
54
54
+
exit compilation_status
55
55
+
56
56
+
let _ =
57
57
+
+ Findlib.init ();
58
58
+
try main ()
59
59
+
with Failure s ->
60
60
+
eprintf "ocamlscript: %s\n%!" s;
34
61
+1
-1
pkgs/development/tools/ocaml/ocamlscript/default.nix
reviewed
···
6
6
sha256 = "1v1i24gijxwris8w4hi95r9swld6dm7jbry0zp72767a3g5ivlrd";
7
7
};
8
8
9
9
-
buildInputs = [ ocaml findlib camlp4 ];
9
9
+
propagatedBuildInputs = [ ocaml findlib camlp4 ];
10
10
11
11
patches = [ ./Makefile.patch ];
12
12