From 5a84b56025c69c3e5ac78bb35921c95ebfa639c1 Mon Sep 17 00:00:00 2001 From: electria Date: Fri, 31 Jul 2026 09:55:08 -0700 Subject: [PATCH] build: use libdbus over zenity I completely misunderstood the RFD doc comments, thought that save file dialogs were not avaliable on linux outside of gtk this helps avoid the wrapper, which is nice; but I imagine it would fail if portals are unavaliable. --- flake.nix | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/flake.nix b/flake.nix index 2fc6470..40636f4 100644 --- a/flake.nix +++ b/flake.nix @@ -20,6 +20,9 @@ name = cargoToml.package.name; dlDeps = with pkgs; [ + # libdbus, for rfd + dbus + # needed for both x11 and wayland libxkbcommon libGL @@ -77,19 +80,13 @@ // { inherit cargoArtifacts; - nativeBuildInputs = - commonArgs.nativeBuildInputs - ++ [ - pkgs.autoPatchelfHook - ] - ++ lib.optional pkgs.stdenv.hostPlatform.isLinux pkgs.makeBinaryWrapper; + nativeBuildInputs = commonArgs.nativeBuildInputs ++ [ + pkgs.autoPatchelfHook + ]; - buildInputs = - commonArgs.buildInputs - ++ [ - pkgs.libgcc - ] - ++ lib.optional pkgs.stdenv.hostPlatform.isLinux pkgs.zenity; + buildInputs = commonArgs.buildInputs ++ [ + pkgs.libgcc + ]; runtimeDependencies = dlDeps; @@ -98,10 +95,6 @@ postFixup = '' mkdir -p "$out/share/applications" ln -s "${desktopItem}"/share/applications/* "$out/share/applications/" - '' - + lib.optionalString pkgs.stdenv.hostPlatform.isLinux /* sh */ '' - wrapProgram $out/bin/${name} \ - --prefix PATH : ${lib.makeBinPath [ pkgs.zenity ]} ''; } );