summaryrefslogtreecommitdiff
path: root/nix/package/ocamlformat-rpc-bin.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nix/package/ocamlformat-rpc-bin.nix')
-rw-r--r--nix/package/ocamlformat-rpc-bin.nix16
1 files changed, 16 insertions, 0 deletions
diff --git a/nix/package/ocamlformat-rpc-bin.nix b/nix/package/ocamlformat-rpc-bin.nix
new file mode 100644
index 0000000..935c314
--- /dev/null
+++ b/nix/package/ocamlformat-rpc-bin.nix
@@ -0,0 +1,16 @@
+#──────────────────────────────────────────────────────────────────────────────┐
+# SPDX-FileCopyrightText: 2025 toastal <https://toast.al/contact/> │
+# SPDX-License-Identifier: LGPL-2.1-or-later │
+#──────────────────────────────────────────────────────────────────────────────┘
+# I don’t like ocamlformat as it doesn’t have tab support despite OCaml fully
+# supporting tabs — so I use Topiary. However, the OCaml LSP requires
+{
+ lib,
+ runCommand,
+ ocamlformat,
+}:
+
+runCommand "extract-ocamlformat-rpc-bin" { } ''
+ mkdir -p $out/bin
+ cp ${lib.getBin ocamlformat}/bin/ocamlformat-rpc $out/bin/
+''