lol
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

xfce.thunar: Expose unwrapped derivation (#425075)

authored by

Bobby Rong and committed by
GitHub
8fe37315 23041583

+102 -111
+2
nixos/tests/xfce.nix
··· 19 19 20 20 services.xserver.desktopManager.xfce.enable = true; 21 21 environment.systemPackages = [ pkgs.xfce.xfce4-whiskermenu-plugin ]; 22 + 23 + programs.thunar.plugins = [ pkgs.xfce.thunar-archive-plugin ]; 22 24 }; 23 25 24 26 enableOCR = true;
+48 -67
pkgs/desktops/xfce/core/thunar/default.nix
··· 16 16 pcre2, 17 17 xfce4-panel, 18 18 xfconf, 19 - makeWrapper, 20 - symlinkJoin, 21 - thunarPlugins ? [ ], 22 19 withIntrospection ? false, 23 - buildPackages, 24 20 gobject-introspection, 25 21 }: 26 22 27 - let 28 - unwrapped = mkXfceDerivation { 29 - category = "xfce"; 30 - pname = "thunar"; 31 - version = "4.20.3"; 23 + mkXfceDerivation { 24 + category = "xfce"; 25 + pname = "thunar"; 26 + version = "4.20.3"; 32 27 33 - sha256 = "sha256-YOh7tuCja9F2VvzX+QqsKHJfebXWbhLqvcraq6PBOGo="; 28 + sha256 = "sha256-YOh7tuCja9F2VvzX+QqsKHJfebXWbhLqvcraq6PBOGo="; 34 29 35 - nativeBuildInputs = 36 - [ 37 - docbook_xsl 38 - libxslt 39 - ] 40 - ++ lib.optionals withIntrospection [ 41 - gobject-introspection 42 - ]; 30 + nativeBuildInputs = 31 + [ 32 + docbook_xsl 33 + libxslt 34 + ] 35 + ++ lib.optionals withIntrospection [ 36 + gobject-introspection 37 + ]; 43 38 44 - buildInputs = [ 45 - exo 46 - gdk-pixbuf 47 - gtk3 48 - libX11 49 - libexif # image properties page 50 - libgudev 51 - libnotify 52 - libxfce4ui 53 - libxfce4util 54 - pcre2 # search & replace renamer 55 - xfce4-panel # trash panel applet plugin 56 - xfconf 57 - ]; 39 + buildInputs = [ 40 + exo 41 + gdk-pixbuf 42 + gtk3 43 + libX11 44 + libexif # image properties page 45 + libgudev 46 + libnotify 47 + libxfce4ui 48 + libxfce4util 49 + pcre2 # search & replace renamer 50 + xfce4-panel # trash panel applet plugin 51 + xfconf 52 + ]; 58 53 59 - configureFlags = [ "--with-custom-thunarx-dirs-enabled" ]; 54 + configureFlags = [ "--with-custom-thunarx-dirs-enabled" ]; 60 55 61 - # the desktop file … is in an insecure location» 62 - # which pops up when invoking desktop files that are 63 - # symlinks to the /nix/store 64 - # 65 - # this error was added by this commit: 66 - # https://github.com/xfce-mirror/thunar/commit/1ec8ff89ec5a3314fcd6a57f1475654ddecc9875 67 - postPatch = '' 68 - sed -i -e 's|thunar_dialogs_show_insecure_program (parent, _(".*"), file, exec)|1|' thunar/thunar-file.c 69 - ''; 56 + # the desktop file … is in an insecure location» 57 + # which pops up when invoking desktop files that are 58 + # symlinks to the /nix/store 59 + # 60 + # this error was added by this commit: 61 + # https://github.com/xfce-mirror/thunar/commit/1ec8ff89ec5a3314fcd6a57f1475654ddecc9875 62 + postPatch = '' 63 + sed -i -e 's|thunar_dialogs_show_insecure_program (parent, _(".*"), file, exec)|1|' thunar/thunar-file.c 64 + ''; 70 65 71 - preFixup = '' 72 - gappsWrapperArgs+=( 73 - # https://github.com/NixOS/nixpkgs/issues/329688 74 - --prefix PATH : ${lib.makeBinPath [ exo ]} 75 - ) 76 - ''; 66 + preFixup = '' 67 + gappsWrapperArgs+=( 68 + # https://github.com/NixOS/nixpkgs/issues/329688 69 + --prefix PATH : ${lib.makeBinPath [ exo ]} 70 + ) 71 + ''; 77 72 78 - meta = with lib; { 79 - description = "Xfce file manager"; 80 - mainProgram = "thunar"; 81 - teams = [ teams.xfce ]; 82 - }; 73 + meta = with lib; { 74 + description = "Xfce file manager"; 75 + mainProgram = "thunar"; 76 + teams = [ teams.xfce ]; 83 77 }; 84 - 85 - in 86 - if thunarPlugins == [ ] then 87 - unwrapped 88 - else 89 - import ./wrapper.nix { 90 - inherit 91 - makeWrapper 92 - symlinkJoin 93 - thunarPlugins 94 - lib 95 - ; 96 - thunar = unwrapped; 97 - } 78 + }
+48 -40
pkgs/desktops/xfce/core/thunar/wrapper.nix
··· 2 2 lib, 3 3 makeWrapper, 4 4 symlinkJoin, 5 - thunar, 6 - thunarPlugins, 5 + thunar-unwrapped, 6 + thunarPlugins ? [ ], 7 7 }: 8 8 9 - symlinkJoin { 10 - name = "thunar-with-plugins-${thunar.version}"; 9 + let 10 + thunar = thunar-unwrapped; 11 + in 11 12 12 - paths = [ thunar ] ++ thunarPlugins; 13 + if thunarPlugins == [ ] then 14 + thunar 13 15 14 - nativeBuildInputs = [ makeWrapper ]; 16 + else 17 + symlinkJoin { 18 + name = "thunar-with-plugins-${thunar.version}"; 15 19 16 - postBuild = '' 17 - wrapProgram "$out/bin/thunar" \ 18 - --set "THUNARX_DIRS" "$out/lib/thunarx-3" 20 + paths = [ thunar ] ++ thunarPlugins; 19 21 20 - wrapProgram "$out/bin/thunar-settings" \ 21 - --set "THUNARX_DIRS" "$out/lib/thunarx-3" 22 + nativeBuildInputs = [ makeWrapper ]; 22 23 23 - # NOTE: we need to remove the folder symlink itself and create 24 - # a new folder before trying to substitute any file below. 25 - rm -f "$out/lib/systemd/user" 26 - mkdir -p "$out/lib/systemd/user" 24 + postBuild = '' 25 + wrapProgram "$out/bin/thunar" \ 26 + --set "THUNARX_DIRS" "$out/lib/thunarx-3" 27 27 28 - # point to wrapped binary in all service files 29 - for file in "lib/systemd/user/thunar.service" \ 30 - "share/dbus-1/services/org.xfce.FileManager.service" \ 31 - "share/dbus-1/services/org.xfce.Thunar.FileManager1.service" \ 32 - "share/dbus-1/services/org.xfce.Thunar.service" 33 - do 34 - rm -f "$out/$file" 35 - substitute "${thunar}/$file" "$out/$file" \ 36 - --replace "${thunar}" "$out" 37 - done 38 - ''; 28 + wrapProgram "$out/bin/thunar-settings" \ 29 + --set "THUNARX_DIRS" "$out/lib/thunarx-3" 39 30 40 - meta = with lib; { 41 - inherit (thunar.meta) 42 - homepage 43 - license 44 - platforms 45 - teams 46 - ; 31 + # NOTE: we need to remove the folder symlink itself and create 32 + # a new folder before trying to substitute any file below. 33 + rm -f "$out/lib/systemd/user" 34 + mkdir -p "$out/lib/systemd/user" 47 35 48 - description = 49 - thunar.meta.description 50 - + 51 - optionalString (0 != length thunarPlugins) 52 - " (with plugins: ${concatStringsSep ", " (map (x: x.name) thunarPlugins)})"; 53 - }; 54 - } 36 + # point to wrapped binary in all service files 37 + for file in "lib/systemd/user/thunar.service" \ 38 + "share/dbus-1/services/org.xfce.FileManager.service" \ 39 + "share/dbus-1/services/org.xfce.Thunar.FileManager1.service" \ 40 + "share/dbus-1/services/org.xfce.Thunar.service" 41 + do 42 + rm -f "$out/$file" 43 + substitute "${thunar}/$file" "$out/$file" \ 44 + --replace "${thunar}" "$out" 45 + done 46 + ''; 47 + 48 + meta = with lib; { 49 + inherit (thunar.meta) 50 + homepage 51 + license 52 + platforms 53 + teams 54 + ; 55 + 56 + description = 57 + thunar.meta.description 58 + + 59 + optionalString (0 != length thunarPlugins) 60 + " (with plugins: ${concatStringsSep ", " (map (x: x.name) thunarPlugins)})"; 61 + }; 62 + }
+4 -4
pkgs/desktops/xfce/default.nix
··· 33 33 34 34 libxfce4windowing = callPackage ./core/libxfce4windowing { }; 35 35 36 - thunar = callPackage ./core/thunar { 37 - thunarPlugins = [ ]; 38 - }; 36 + thunar-unwrapped = callPackage ./core/thunar { }; 37 + 38 + thunar = callPackage ./core/thunar/wrapper.nix { }; 39 39 40 40 thunar-volman = callPackage ./core/thunar-volman { }; 41 41 ··· 169 169 170 170 xinitrc = self.xfce4-session.xinitrc; # added 2019-11-04 171 171 172 - thunar-bare = self.thunar.override { thunarPlugins = [ ]; }; # added 2019-11-04 172 + thunar-bare = self.thunar-unwrapped; # added 2019-11-04 173 173 174 174 xfce4-datetime-plugin = throw '' 175 175 xfce4-datetime-plugin has been removed: this plugin has been merged into the xfce4-panel's built-in clock