playonlinux: making it work at runtime (#112093)
playonlinux: GSettings schemas necessary to avoid crash on file dialog playonlinux: adding steam-run to exec downloaded wine Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
This commit is contained in:
parent
e69517f1e2
commit
ae1f9d3820
17
pkgs/applications/misc/playonlinux/0001-fix-locale.patch
Normal file
17
pkgs/applications/misc/playonlinux/0001-fix-locale.patch
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
diff --git a/python/lib/lng.py b/python/lib/lng.py
|
||||||
|
index a390d920..00c3527e 100755
|
||||||
|
--- a/python/lib/lng.py
|
||||||
|
+++ b/python/lib/lng.py
|
||||||
|
@@ -12,11 +12,7 @@ class Lang(object):
|
||||||
|
|
||||||
|
class iLang(object):
|
||||||
|
def __init__(self):
|
||||||
|
- if(os.environ["DEBIAN_PACKAGE"] == "TRUE"):
|
||||||
|
- languages = os.listdir('/usr/share/locale')
|
||||||
|
- else:
|
||||||
|
- languages = os.listdir(Variables.playonlinux_env+'/lang/locale')
|
||||||
|
-
|
||||||
|
+ languages = os.listdir('@out@/share/playonlinux/lang/locale')
|
||||||
|
if(os.environ["POL_OS"] == "Mac"):
|
||||||
|
wxLocale = wx.Locale().FindLanguageInfo(os.environ["RLANG"])
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
, imagemagick
|
, imagemagick
|
||||||
, netcat-gnu
|
, netcat-gnu
|
||||||
, p7zip
|
, p7zip
|
||||||
, python2
|
, python3
|
||||||
, unzip
|
, unzip
|
||||||
, wget
|
, wget
|
||||||
, wine
|
, wine
|
||||||
|
@ -22,6 +22,9 @@
|
||||||
, jq
|
, jq
|
||||||
, xorg
|
, xorg
|
||||||
, libGL
|
, libGL
|
||||||
|
, steam-run-native
|
||||||
|
# needed for avoiding crash on file selector
|
||||||
|
, gsettings-desktop-schemas
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
@ -54,9 +57,10 @@ let
|
||||||
ld64 = "${stdenv.cc}/nix-support/dynamic-linker";
|
ld64 = "${stdenv.cc}/nix-support/dynamic-linker";
|
||||||
libs = pkgs: lib.makeLibraryPath [ xorg.libX11 libGL ];
|
libs = pkgs: lib.makeLibraryPath [ xorg.libX11 libGL ];
|
||||||
|
|
||||||
python = python2.withPackages(ps: with ps; [
|
python = python3.withPackages(ps: with ps; [
|
||||||
wxPython
|
wxPython_4_1
|
||||||
setuptools
|
setuptools
|
||||||
|
natsort
|
||||||
]);
|
]);
|
||||||
|
|
||||||
in stdenv.mkDerivation {
|
in stdenv.mkDerivation {
|
||||||
|
@ -68,8 +72,16 @@ in stdenv.mkDerivation {
|
||||||
sha256 = "0n40927c8cnjackfns68zwl7h4d7dvhf7cyqdkazzwwx4k2xxvma";
|
sha256 = "0n40927c8cnjackfns68zwl7h4d7dvhf7cyqdkazzwwx4k2xxvma";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
./0001-fix-locale.patch
|
||||||
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [ makeWrapper ];
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
|
|
||||||
|
preBuild = ''
|
||||||
|
makeFlagsArray+=(PYTHON="python -m py_compile")
|
||||||
|
'';
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
xorg.libX11
|
xorg.libX11
|
||||||
libGL
|
libGL
|
||||||
|
@ -77,6 +89,7 @@ in stdenv.mkDerivation {
|
||||||
];
|
];
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
|
substituteAllInPlace python/lib/lng.py
|
||||||
patchShebangs python tests/python
|
patchShebangs python tests/python
|
||||||
sed -i "s/ %F//g" etc/PlayOnLinux.desktop
|
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
|
install -D -m644 etc/PlayOnLinux.desktop $out/share/applications/playonlinux.desktop
|
||||||
|
|
||||||
makeWrapper $out/share/playonlinux/playonlinux $out/bin/playonlinux \
|
makeWrapper $out/share/playonlinux/playonlinux{,-wrapper} \
|
||||||
--prefix PATH : ${binpath}
|
--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
|
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
|
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";
|
description = "GUI for managing Windows programs under linux";
|
||||||
homepage = "https://www.playonlinux.com/";
|
homepage = "https://www.playonlinux.com/";
|
||||||
license = licenses.gpl3;
|
license = licenses.gpl3;
|
||||||
maintainers = [ maintainers.a1russell ];
|
maintainers = [ maintainers.pasqui23 ];
|
||||||
platforms = [ "x86_64-linux" "i686-linux" ];
|
platforms = [ "x86_64-linux" "i686-linux" ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user