git.iko.soy/typeable/nixpkgs
on master help sign in
playonlinux: improve wrapping

add hicolor-icon-theme to fix gtk warning

commit0876565e5c2569348ab7487e491a42e97c2aea4b authorArtturin <Artturin@artturin.com> dateTue 1 Mar 2022, 21:55 (5 years ago) parentc1dfec2
1 file changed+13−11
pkgs/applications/misc/playonlinux/default.nix+13−11
pkgs/applications/misc/playonlinux/default.nix+13−11
@@ -22,11 +22,12 @@
2222, jq
2323, xorg
2424, libGL
25−, steam-run-native
25+, steam-run
2626# needed for avoiding crash on file selector
2727, gsettings-desktop-schemas
2828, glib
2929, wrapGAppsHook
30+, hicolor-icon-theme
3031}:
3132
3233let
@@ -89,6 +90,8 @@ in stdenv.mkDerivation {
8990 xorg.libX11
9091 libGL
9192 python
93+ gsettings-desktop-schemas
94+ hicolor-icon-theme
9295 ];
9396
9497 postPatch = ''
@@ -103,16 +106,6 @@ in stdenv.mkDerivation {
103106
104107 install -D -m644 etc/PlayOnLinux.desktop $out/share/applications/playonlinux.desktop
105108
106− makeWrapper $out/share/playonlinux/playonlinux{,-wrapper} \
107− --prefix PATH : ${binpath} \
108− --prefix XDG_DATA_DIRS : ${gsettings-desktop-schemas}/share/GConf
109− # steam-run is needed to run the downloaded wine executables
110− mkdir -p $out/bin
111− cat > $out/bin/playonlinux <<EOF
112− #!${stdenv.shell} -e
113− exec ${steam-run-native}/bin/steam-run $out/share/playonlinux/playonlinux-wrapper "\$@"
114− EOF
115− chmod a+x $out/bin/playonlinux
116109
117110 bunzip2 $out/share/playonlinux/bin/check_dd_x86.bz2
118111 patchelf --set-interpreter $(cat ${ld32}) --set-rpath ${libs pkgsi686Linux} $out/share/playonlinux/bin/check_dd_x86
@@ -127,6 +120,15 @@ in stdenv.mkDerivation {
127120 done
128121 '';
129122
123+ dontWrapGApps = true;
124+ postFixup = ''
125+ makeWrapper $out/share/playonlinux/playonlinux{,-wrapped} \
126+ --prefix PATH : ${binpath} \
127+ ''${gappsWrapperArgs[@]}
128+ makeWrapper ${steam-run}/bin/steam-run $out/bin/playonlinux \
129+ --add-flags $out/share/playonlinux/playonlinux-wrapped
130+ '';
131+
130132 meta = with lib; {
131133 description = "GUI for managing Windows programs under linux";
132134 homepage = "https://www.playonlinux.com/";