summary refs log tree commit diff stats
path: root/overlays
diff options
context:
space:
mode:
Diffstat (limited to 'overlays')
-rw-r--r--overlays/node-packages/default.nix5
-rw-r--r--overlays/node-packages/prettierd.patch32
2 files changed, 36 insertions, 1 deletions
diff --git a/overlays/node-packages/default.nix b/overlays/node-packages/default.nix
index 3e5c9259..b89a10a3 100644
--- a/overlays/node-packages/default.nix
+++ b/overlays/node-packages/default.nix
@@ -1,6 +1,9 @@
 self: super: {
   nodePackages = super.nodePackages.extend
     (final: prev:
-      super.callPackage ./prettier-plugin-go-template { }
+      super.callPackage ./prettier-plugin-go-template { } // { }
     );
+  prettierd = super.prettierd.overrideAttrs (old: {
+    patches = [ ./prettierd.patch ];
+  });
 }
diff --git a/overlays/node-packages/prettierd.patch b/overlays/node-packages/prettierd.patch
new file mode 100644
index 00000000..9abb572d
--- /dev/null
+++ b/overlays/node-packages/prettierd.patch
@@ -0,0 +1,32 @@
+diff --git a/src/service.ts b/src/service.ts
+index 93164e5..eafc38f 100644
+--- a/src/service.ts
++++ b/src/service.ts
+@@ -153,8 +153,26 @@ function parseCLIArguments(args: string[]): [CLIArguments, string, CliOptions] {
+           parsedArguments.ignorePath = nextArg.value;
+           break;
+         }
++        case "--stdin-filepath": {
++          const nextArg = argsIterator.next();
++          if (nextArg.done) {
++            throw new Error("--stdin-filepath option expects a file path");
++          }
++
++          fileName = nextArg.value;
++          break;
++        }
+         default: {
+-          optionArgs.push(arg);
++          if (arg.includes("=")) {
++            optionArgs.push(arg);
++          } else {
++            const nextArg = argsIterator.next();
++            if (nextArg.done) {
++              throw new Error(`--${arg} expects a value`);
++            }
++
++            optionArgs.push(`${arg}=${nextArg.value}`);
++          }
+         }
+       }
+     } else {