about summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules
diff options
context:
space:
mode:
authorJules Aguillon <jules@j3s.fr>2023-07-04 13:56:44 +0200
committerVincent Laporte <vbgl@users.noreply.github.com>2024-01-02 13:38:23 +0100
commit9a03ab9b7a7860128678df59263c44f357c6815c (patch)
tree68cb85392164359ed84239704fb97813c4fca8b4 /pkgs/development/ocaml-modules
parentb722b9ddffa719177373d0f1f299c8528e5fed85 (diff)
ocamlPackages.mdx: Reduce closure size
Disable the optional dependencies of the logs library: js_of_ocaml, lwt
Mdx is a binary tool so this is unlikely to cause a problem.
Diffstat (limited to 'pkgs/development/ocaml-modules')
-rw-r--r--pkgs/development/ocaml-modules/mdx/default.nix11
1 files changed, 10 insertions, 1 deletions
diff --git a/pkgs/development/ocaml-modules/mdx/default.nix b/pkgs/development/ocaml-modules/mdx/default.nix
index ccda3f38b5ebf..53ea92a2bbef9 100644
--- a/pkgs/development/ocaml-modules/mdx/default.nix
+++ b/pkgs/development/ocaml-modules/mdx/default.nix
@@ -4,6 +4,13 @@
 , gitUpdater
 }:
 
+let
+  # Strip optional dependencies from logs to make the closure smaller as this
+  # package contains a binary
+  logs' = logs.override { jsooSupport = false; lwtSupport = false; };
+
+in
+
 buildDunePackage rec {
   pname = "mdx";
   version = "2.3.1";
@@ -16,7 +23,9 @@ buildDunePackage rec {
   };
 
   nativeBuildInputs = [ cppo ];
-  propagatedBuildInputs = [ astring fmt logs csexp ocaml-version camlp-streams re findlib ];
+  propagatedBuildInputs = [
+    astring fmt logs' csexp ocaml-version camlp-streams re findlib
+  ];
   checkInputs = [ alcotest lwt ];
 
   doCheck = true;