summary refs log tree commit diff
path: root/pkgs/applications/misc/playonlinux/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/misc/playonlinux/default.nix')
-rw-r--r--pkgs/applications/misc/playonlinux/default.nix24
1 files changed, 13 insertions, 11 deletions
diff --git a/pkgs/applications/misc/playonlinux/default.nix b/pkgs/applications/misc/playonlinux/default.nix
index 761d7f6f0f400..74f3408151771 100644
--- a/pkgs/applications/misc/playonlinux/default.nix
+++ b/pkgs/applications/misc/playonlinux/default.nix
@@ -22,11 +22,12 @@
 , jq
 , xorg
 , libGL
-, steam-run-native
+, steam-run
 # needed for avoiding crash on file selector
 , gsettings-desktop-schemas
 , glib
 , wrapGAppsHook
+, hicolor-icon-theme
 }:
 
 let
@@ -89,6 +90,8 @@ in stdenv.mkDerivation {
     xorg.libX11
     libGL
     python
+    gsettings-desktop-schemas
+    hicolor-icon-theme
   ];
 
   postPatch = ''
@@ -103,16 +106,6 @@ in stdenv.mkDerivation {
 
     install -D -m644 etc/PlayOnLinux.desktop $out/share/applications/playonlinux.desktop
 
-    makeWrapper $out/share/playonlinux/playonlinux{,-wrapper} \
-      --prefix PATH : ${binpath} \
-      --prefix XDG_DATA_DIRS : ${gsettings-desktop-schemas}/share/GConf
-    # steam-run is needed to run the downloaded wine executables
-    mkdir -p $out/bin
-    cat > $out/bin/playonlinux <<EOF
-    #!${stdenv.shell} -e
-    exec ${steam-run-native}/bin/steam-run $out/share/playonlinux/playonlinux-wrapper "\$@"
-    EOF
-    chmod a+x $out/bin/playonlinux
 
     bunzip2 $out/share/playonlinux/bin/check_dd_x86.bz2
     patchelf --set-interpreter $(cat ${ld32}) --set-rpath ${libs pkgsi686Linux} $out/share/playonlinux/bin/check_dd_x86
@@ -127,6 +120,15 @@ in stdenv.mkDerivation {
     done
   '';
 
+  dontWrapGApps = true;
+  postFixup = ''
+    makeWrapper $out/share/playonlinux/playonlinux{,-wrapped} \
+      --prefix PATH : ${binpath} \
+      ''${gappsWrapperArgs[@]}
+    makeWrapper ${steam-run}/bin/steam-run $out/bin/playonlinux \
+      --add-flags $out/share/playonlinux/playonlinux-wrapped
+  '';
+
   meta = with lib; {
     description = "GUI for managing Windows programs under linux";
     homepage = "https://www.playonlinux.com/";