about summary refs log tree commit diff stats
path: root/sys/svcs/xdg/default.nix
diff options
context:
space:
mode:
authorSoispha <soispha@vhack.eu>2023-12-29 11:58:20 +0100
committerSoispha <soispha@vhack.eu>2023-12-29 12:00:38 +0100
commitf93f3faf45238243a1069fc89ee11d79774d8ae0 (patch)
treefeb1ef511c8f905fc7fcf0aad867482f66e057d9 /sys/svcs/xdg/default.nix
parentfix(sys/svcs/xdg/portals): Use correct path to lf wrapper (diff)
downloadnixos-config-f93f3faf45238243a1069fc89ee11d79774d8ae0.tar.gz
nixos-config-f93f3faf45238243a1069fc89ee11d79774d8ae0.zip
fix(sys/svcs/xdg/portals): Set correct permission of shell script
Diffstat (limited to 'sys/svcs/xdg/default.nix')
-rw-r--r--sys/svcs/xdg/default.nix17
1 files changed, 10 insertions, 7 deletions
diff --git a/sys/svcs/xdg/default.nix b/sys/svcs/xdg/default.nix
index 73292894..ec17a61d 100644
--- a/sys/svcs/xdg/default.nix
+++ b/sys/svcs/xdg/default.nix
@@ -11,13 +11,16 @@
         enable = true;
         settings = {
           filechooser = {
-            cmd = "${sysLib.writeShellScriptWithLibraryAndKeepPath {
-              name = "lf_wrapper";
-              src = ./scripts/lf_wrapper;
-              dependencies = with pkgs; [
-                lf
-              ];
-            }}/bin/lf_wrapper";
+            cmd = let
+              nativeBuildInputs = with pkgs; [makeWrapper lf gawk coreutils mktemp dash fd gnugrep];
+            in "${pkgs.runCommandLocal "lf_wrapper" {
+                inherit nativeBuildInputs;
+              } ''
+                install -m755 ${./scripts/lf_wrapper} -D "$out/bin/lf_wrapper"
+                patchShebangs "$out/bin/lf_wrapper"
+                wrapProgram "$out/bin/lf_wrapper" --prefix PATH : ${pkgs.lib.makeBinPath nativeBuildInputs};
+                chown -R 1000:100 "$out/bin"
+              ''}/bin/lf_wrapper";
           };
         };
       };