Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
63 lines
1.5 KiB
Nix
63 lines
1.5 KiB
Nix
{
|
|
lib,
|
|
makeWrapper,
|
|
symlinkJoin,
|
|
thunar-unwrapped,
|
|
thunarPlugins ? [ ],
|
|
}:
|
|
|
|
let
|
|
thunar = thunar-unwrapped;
|
|
in
|
|
|
|
if thunarPlugins == [ ] then
|
|
thunar
|
|
|
|
else
|
|
symlinkJoin {
|
|
name = "thunar-with-plugins-${thunar.version}";
|
|
|
|
paths = [ thunar ] ++ thunarPlugins;
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
postBuild = ''
|
|
wrapProgram "$out/bin/thunar" \
|
|
--set "THUNARX_DIRS" "$out/lib/thunarx-3"
|
|
|
|
wrapProgram "$out/bin/thunar-settings" \
|
|
--set "THUNARX_DIRS" "$out/lib/thunarx-3"
|
|
|
|
# NOTE: we need to remove the folder symlink itself and create
|
|
# a new folder before trying to substitute any file below.
|
|
rm -f "$out/lib/systemd/user"
|
|
mkdir -p "$out/lib/systemd/user"
|
|
|
|
# point to wrapped binary in all service files
|
|
for file in "lib/systemd/user/thunar.service" \
|
|
"share/dbus-1/services/org.xfce.FileManager.service" \
|
|
"share/dbus-1/services/org.xfce.Thunar.FileManager1.service" \
|
|
"share/dbus-1/services/org.xfce.Thunar.service"
|
|
do
|
|
rm -f "$out/$file"
|
|
substitute "${thunar}/$file" "$out/$file" \
|
|
--replace "${thunar}" "$out"
|
|
done
|
|
'';
|
|
|
|
meta = with lib; {
|
|
inherit (thunar.meta)
|
|
homepage
|
|
license
|
|
platforms
|
|
teams
|
|
;
|
|
|
|
description =
|
|
thunar.meta.description
|
|
+
|
|
optionalString (0 != length thunarPlugins)
|
|
" (with plugins: ${concatStringsSep ", " (map (x: x.name) thunarPlugins)})";
|
|
};
|
|
}
|