From c3bb59ee5cc6d700f6edf98c65a853efa09993ef Mon Sep 17 00:00:00 2001
From: Daniel Olsen <daniel.olsen99@gmail.com>
Date: Tue, 28 Jan 2025 23:33:34 +0100
Subject: [PATCH] fjordlauncher: pass through java paths

---
 overlay.nix | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/overlay.nix b/overlay.nix
index b037e96..d638fff 100644
--- a/overlay.nix
+++ b/overlay.nix
@@ -7,5 +7,10 @@ in rec {
   in table.${hash} or (prev.requireFile args);
 
   fjordlauncher-unwrapped = import ./pkgs/fjordlauncher/unwrapped.nix final prev;
-  fjordlauncher = final.prismlauncher.override { prismlauncher-unwrapped = fjordlauncher-unwrapped; };
+  fjordlauncher = (final.prismlauncher.override { prismlauncher-unwrapped = fjordlauncher-unwrapped; }).overrideAttrs (oldAttrs: {
+    qtWrapperArgs = (builtins.map
+      (final.lib.strings.replaceStrings [ "PRISMLAUNCHER" ] ["FJORDLAUNCHER"])
+      oldAttrs.qtWrapperArgs
+    );
+  });
 }