about summary refs log tree commit diff
path: root/pkgs/tools/misc/flitter
diff options
context:
space:
mode:
authorAaron L. Zeng <me@bcc32.com>2022-05-23 01:18:37 -0400
committerAaron L. Zeng <me@bcc32.com>2022-07-07 00:32:11 -0400
commit4f6ddfdd23f0c3571af65465c8937b2640f988ff (patch)
tree7b5c2d29211f7686b3aa1849bed8263b30e7b456 /pkgs/tools/misc/flitter
parent99b11e4c97dc686a823f8bc5aeac32a90dd7891b (diff)
Add Jane Street ocaml packages version 0.15
- ocamlPackages.tls*: 0.15.2 -> 0.15.3
- ocamlPackages.bistro: unstable-2021-11-13 -> unstable-2022-05-07
- ocamlPackages.phylogenetics: 0.1.0 -> unstable-2022-05-06
Diffstat (limited to 'pkgs/tools/misc/flitter')
-rw-r--r--pkgs/tools/misc/flitter/default.nix12
-rw-r--r--pkgs/tools/misc/flitter/flitter.patch13
2 files changed, 22 insertions, 3 deletions
diff --git a/pkgs/tools/misc/flitter/default.nix b/pkgs/tools/misc/flitter/default.nix
index 49903559c136a..a46b3b72abed5 100644
--- a/pkgs/tools/misc/flitter/default.nix
+++ b/pkgs/tools/misc/flitter/default.nix
@@ -20,11 +20,17 @@ ocamlPackages.buildDunePackage rec {
     sha256 = "1k3m7bjq5yrrq7vhnbdykni65dsqhq6knnv9wvwq3svb3n07z4w3";
   };
 
+  # compatibility with core >= 0.15
+  patches = [ ./flitter.patch ];
+
   # https://github.com/alexozer/flitter/issues/28
   postPatch = ''
-    for f in src/colors.ml src/duration.ml src/event_loop.ml src/splits.ml; do
+    for f in src/*.ml; do
       substituteInPlace "$f" \
-        --replace 'Unix.gettimeofday' 'Caml_unix.gettimeofday'
+        --replace 'Unix.gettimeofday' 'Caml_unix.gettimeofday' \
+        --replace 'Core_kernel' 'Core' \
+        --replace 'sexp_option' 'option[@sexp.option]' \
+        --replace 'sexp_list' 'list[@sexp.list]'
     done
   '';
 
@@ -33,7 +39,7 @@ ocamlPackages.buildDunePackage rec {
   ];
 
   buildInputs = with ocamlPackages; [
-    core
+    core_unix
     lwt_ppx
     sexp_pretty
     color
diff --git a/pkgs/tools/misc/flitter/flitter.patch b/pkgs/tools/misc/flitter/flitter.patch
new file mode 100644
index 0000000000000..f59b8a22eb676
--- /dev/null
+++ b/pkgs/tools/misc/flitter/flitter.patch
@@ -0,0 +1,13 @@
+diff --git a/src/dune b/src/dune
+index a50b09a..54cc770 100644
+--- a/src/dune
++++ b/src/dune
+@@ -1,7 +1,7 @@
+ (library
+   (name flitter)
+   (wrapped false)
+-  (libraries core lwt.unix notty notty.unix re color sexp_pretty)
++  (libraries core core_kernel.caml_unix lwt.unix notty notty.unix re color sexp_pretty)
+   (preprocess (pps lwt_ppx ppx_sexp_conv))
+   )
+