aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie/nixpkgs/pkgs/applications/misc/playonlinux/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'infra/libkookie/nixpkgs/pkgs/applications/misc/playonlinux/default.nix')
-rw-r--r--infra/libkookie/nixpkgs/pkgs/applications/misc/playonlinux/default.nix33
1 files changed, 27 insertions, 6 deletions
diff --git a/infra/libkookie/nixpkgs/pkgs/applications/misc/playonlinux/default.nix b/infra/libkookie/nixpkgs/pkgs/applications/misc/playonlinux/default.nix
index d805aa0c0aa9..320d771bc67c 100644
--- a/infra/libkookie/nixpkgs/pkgs/applications/misc/playonlinux/default.nix
+++ b/infra/libkookie/nixpkgs/pkgs/applications/misc/playonlinux/default.nix
@@ -9,7 +9,7 @@
, imagemagick
, netcat-gnu
, p7zip
-, python2
+, python3
, unzip
, wget
, wine
@@ -22,6 +22,9 @@
, jq
, xorg
, libGL
+, steam-run-native
+# needed for avoiding crash on file selector
+, gsettings-desktop-schemas
}:
let
@@ -54,9 +57,10 @@ let
ld64 = "${stdenv.cc}/nix-support/dynamic-linker";
libs = pkgs: lib.makeLibraryPath [ xorg.libX11 libGL ];
- python = python2.withPackages(ps: with ps; [
- wxPython
+ python = python3.withPackages(ps: with ps; [
+ wxPython_4_1
setuptools
+ natsort
]);
in stdenv.mkDerivation {
@@ -68,8 +72,16 @@ in stdenv.mkDerivation {
sha256 = "0n40927c8cnjackfns68zwl7h4d7dvhf7cyqdkazzwwx4k2xxvma";
};
+ patches = [
+ ./0001-fix-locale.patch
+ ];
+
nativeBuildInputs = [ makeWrapper ];
+ preBuild = ''
+ makeFlagsArray+=(PYTHON="python -m py_compile")
+ '';
+
buildInputs = [
xorg.libX11
libGL
@@ -77,6 +89,7 @@ in stdenv.mkDerivation {
];
postPatch = ''
+ substituteAllInPlace python/lib/lng.py
patchShebangs python tests/python
sed -i "s/ %F//g" etc/PlayOnLinux.desktop
'';
@@ -87,8 +100,16 @@ in stdenv.mkDerivation {
install -D -m644 etc/PlayOnLinux.desktop $out/share/applications/playonlinux.desktop
- makeWrapper $out/share/playonlinux/playonlinux $out/bin/playonlinux \
- --prefix PATH : ${binpath}
+ 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
@@ -107,7 +128,7 @@ in stdenv.mkDerivation {
description = "GUI for managing Windows programs under linux";
homepage = "https://www.playonlinux.com/";
license = licenses.gpl3;
- maintainers = [ maintainers.a1russell ];
+ maintainers = [ maintainers.pasqui23 ];
platforms = [ "x86_64-linux" "i686-linux" ];
};
}