1{
2 stdenv,
3 mkXfceDerivation,
4 lib,
5 docbook_xsl,
6 exo,
7 gdk-pixbuf,
8 gtk3,
9 libexif,
10 libgudev,
11 libnotify,
12 libX11,
13 libxfce4ui,
14 libxfce4util,
15 libxslt,
16 pcre2,
17 xfce4-panel,
18 xfconf,
19 withIntrospection ? false,
20 gobject-introspection,
21}:
22
23mkXfceDerivation {
24 category = "xfce";
25 pname = "thunar";
26 version = "4.20.4";
27
28 sha256 = "sha256-0yDZI82ePjZSSd0aKlfjr2IVPyNkvSWqa4l6Dse98w8=";
29
30 nativeBuildInputs = [
31 docbook_xsl
32 libxslt
33 ]
34 ++ lib.optionals withIntrospection [
35 gobject-introspection
36 ];
37
38 buildInputs = [
39 exo
40 gdk-pixbuf
41 gtk3
42 libX11
43 libexif # image properties page
44 libgudev
45 libnotify
46 libxfce4ui
47 libxfce4util
48 pcre2 # search & replace renamer
49 xfce4-panel # trash panel applet plugin
50 xfconf
51 ];
52
53 configureFlags = [ "--with-custom-thunarx-dirs-enabled" ];
54
55 # the desktop file … is in an insecure location»
56 # which pops up when invoking desktop files that are
57 # symlinks to the /nix/store
58 #
59 # this error was added by this commit:
60 # https://github.com/xfce-mirror/thunar/commit/1ec8ff89ec5a3314fcd6a57f1475654ddecc9875
61 postPatch = ''
62 sed -i -e 's|thunar_dialogs_show_insecure_program (parent, _(".*"), file, exec)|1|' thunar/thunar-file.c
63 '';
64
65 preFixup = ''
66 gappsWrapperArgs+=(
67 # https://github.com/NixOS/nixpkgs/issues/329688
68 --prefix PATH : ${lib.makeBinPath [ exo ]}
69 )
70 '';
71
72 meta = with lib; {
73 description = "Xfce file manager";
74 mainProgram = "thunar";
75 teams = [ teams.xfce ];
76 };
77}