mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-03 10:44:18 +00:00
eb04659fc2
This was achieved using the following command: sd 'wrapGAppsHook\b' wrapGAppsHook3 (rg -l 'wrapGAppsHook\b') And then manually reverted the following changes: - alias in top-level.nix - function name in wrap-gapps-hook.sh - comment in postFixup of at-spi2-core - comment in gtk4 - comment in preFixup of 1password-gui/linux.nix - comment in postFixup of qgis/unwrapped-ltr.nix and qgis/unwrapped.nix - comment in postFixup of telegram-desktop - comment in postFixup of fwupd - buildCommand of mongodb-compass - postFixup of xflux-gui - comment in a patch in kdePackages.kde-gtk-config and plasma5Packages.kde-gtk-config - description of programs.sway.wrapperFeatures.gtk NixOS option (manual rebuild)
43 lines
1.4 KiB
Nix
43 lines
1.4 KiB
Nix
{ symlinkJoin, lib, rofi-unwrapped, makeWrapper, wrapGAppsHook3, gdk-pixbuf, hicolor-icon-theme, theme ? null, plugins ? [], symlink-dmenu ? false }:
|
|
|
|
symlinkJoin {
|
|
name = "rofi-${rofi-unwrapped.version}";
|
|
|
|
paths = [
|
|
rofi-unwrapped.out
|
|
] ++ (lib.forEach plugins (p: p.out));
|
|
|
|
nativeBuildInputs = [ makeWrapper wrapGAppsHook3 ];
|
|
buildInputs = [ gdk-pixbuf ];
|
|
|
|
preferLocalBuild = true;
|
|
passthru.unwrapped = rofi-unwrapped;
|
|
|
|
dontWrapGApps = true;
|
|
|
|
postBuild = ''
|
|
rm -rf $out/bin
|
|
mkdir $out/bin
|
|
ln -s ${rofi-unwrapped}/bin/* $out/bin
|
|
rm $out/bin/rofi
|
|
|
|
gappsWrapperArgsHook
|
|
makeWrapper ${rofi-unwrapped}/bin/rofi $out/bin/rofi \
|
|
''${gappsWrapperArgs[@]} \
|
|
--prefix XDG_DATA_DIRS : ${hicolor-icon-theme}/share \
|
|
${lib.optionalString (plugins != []) ''--prefix XDG_DATA_DIRS : ${lib.concatStringsSep ":" (lib.forEach plugins (p: "${p.out}/share"))}''} \
|
|
${lib.optionalString (theme != null) ''--add-flags "-theme ${theme}"''} \
|
|
${lib.optionalString (plugins != []) ''--add-flags "-plugin-path $out/lib/rofi"''}
|
|
|
|
${lib.optionalString symlink-dmenu "ln -s ${rofi-unwrapped}/bin/rofi $out/bin/dmenu"}
|
|
|
|
rm $out/bin/rofi-theme-selector
|
|
makeWrapper ${rofi-unwrapped}/bin/rofi-theme-selector $out/bin/rofi-theme-selector \
|
|
--prefix XDG_DATA_DIRS : $out/share
|
|
'';
|
|
|
|
meta = rofi-unwrapped.meta // {
|
|
priority = (rofi-unwrapped.meta.priority or 0) - 1;
|
|
};
|
|
}
|