playonlinux: fix with new wxPython, fix OpenGL check
This commit is contained in:
parent
c8eaa71cae
commit
a5a481e7ee
@ -1,8 +1,6 @@
|
|||||||
{ stdenv
|
{ stdenv
|
||||||
, makeWrapper
|
, makeWrapper
|
||||||
, fetchurl
|
, fetchurl
|
||||||
, wxPython
|
|
||||||
, libXmu
|
|
||||||
, cabextract
|
, cabextract
|
||||||
, gettext
|
, gettext
|
||||||
, glxinfo
|
, glxinfo
|
||||||
@ -11,18 +9,46 @@
|
|||||||
, imagemagick
|
, imagemagick
|
||||||
, netcat
|
, netcat
|
||||||
, p7zip
|
, p7zip
|
||||||
, python
|
, python2Packages
|
||||||
, unzip
|
, unzip
|
||||||
, wget
|
, wget
|
||||||
, wine
|
, wine
|
||||||
, xdg-user-dirs
|
, xdg-user-dirs
|
||||||
, xterm
|
, xterm
|
||||||
|
, pkgs
|
||||||
|
, pkgsi686Linux
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
let
|
||||||
name = "playonlinux-${version}";
|
|
||||||
version = "4.2.9";
|
version = "4.2.9";
|
||||||
|
|
||||||
|
binpath = stdenv.lib.makeSearchPath "bin"
|
||||||
|
[ cabextract
|
||||||
|
python2Packages.python
|
||||||
|
gettext
|
||||||
|
glxinfo
|
||||||
|
gnupg1compat
|
||||||
|
icoutils
|
||||||
|
imagemagick
|
||||||
|
netcat
|
||||||
|
p7zip
|
||||||
|
unzip
|
||||||
|
wget
|
||||||
|
wine
|
||||||
|
xdg-user-dirs
|
||||||
|
xterm
|
||||||
|
];
|
||||||
|
|
||||||
|
ld32 =
|
||||||
|
if stdenv.system == "x86_64-linux" then "${stdenv.cc}/nix-support/dynamic-linker-m32"
|
||||||
|
else if stdenv.system == "i686-linux" then "${stdenv.cc}/nix-support/dynamic-linker"
|
||||||
|
else abort "Unsupported platform for PlayOnLinux";
|
||||||
|
ld64 = "${stdenv.cc}/nix-support/dynamic-linker";
|
||||||
|
libs = pkgs: stdenv.lib.makeLibraryPath [ pkgs.xlibs.libX11 ];
|
||||||
|
|
||||||
|
in stdenv.mkDerivation {
|
||||||
|
name = "playonlinux-${version}";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://www.playonlinux.com/script_files/PlayOnLinux/${version}/PlayOnLinux_${version}.tar.gz";
|
url = "https://www.playonlinux.com/script_files/PlayOnLinux/${version}/PlayOnLinux_${version}.tar.gz";
|
||||||
sha256 = "89bb0fd7cce8cf598ebf38cad716b8587eaca5b916d54386fb24b3ff66b48624";
|
sha256 = "89bb0fd7cce8cf598ebf38cad716b8587eaca5b916d54386fb24b3ff66b48624";
|
||||||
@ -31,74 +57,34 @@ stdenv.mkDerivation rec {
|
|||||||
nativeBuildInputs = [ makeWrapper ];
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
|
|
||||||
buildInputs =
|
buildInputs =
|
||||||
[ wxPython
|
[ python2Packages.python
|
||||||
libXmu
|
python2Packages.wxPython
|
||||||
cabextract
|
python2Packages.setuptools
|
||||||
gettext
|
|
||||||
glxinfo
|
|
||||||
gnupg1compat
|
|
||||||
icoutils
|
|
||||||
imagemagick
|
|
||||||
netcat
|
|
||||||
p7zip
|
|
||||||
python
|
|
||||||
unzip
|
|
||||||
wget
|
|
||||||
wine
|
|
||||||
xdg-user-dirs
|
|
||||||
xterm
|
|
||||||
];
|
];
|
||||||
|
|
||||||
patchPhase = ''
|
patchPhase = ''
|
||||||
PYFILES="python/*.py python/lib/*.py tests/python/*.py"
|
patchShebangs python tests/python
|
||||||
sed -i "s/env python[0-9.]*/python/" $PYFILES
|
|
||||||
sed -i "s/ %F//g" etc/PlayOnLinux.desktop
|
sed -i "s/ %F//g" etc/PlayOnLinux.desktop
|
||||||
'';
|
'';
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
install -d $out/share/playonlinux
|
install -d $out/share/playonlinux
|
||||||
install -d $out/bin
|
|
||||||
cp -r . $out/share/playonlinux/
|
cp -r . $out/share/playonlinux/
|
||||||
|
|
||||||
echo "#!${stdenv.shell}" > $out/bin/playonlinux
|
|
||||||
echo "$prefix/share/playonlinux/playonlinux \"\$@\"" >> $out/bin/playonlinux
|
|
||||||
chmod +x $out/bin/playonlinux
|
|
||||||
|
|
||||||
install -D -m644 etc/PlayOnLinux.desktop $out/share/applications/playonlinux.desktop
|
install -D -m644 etc/PlayOnLinux.desktop $out/share/applications/playonlinux.desktop
|
||||||
'';
|
|
||||||
|
|
||||||
preFixupPhases = [ "preFixupPhase" ];
|
makeWrapper $out/share/playonlinux/playonlinux $out/bin/playonlinux \
|
||||||
|
--prefix PYTHONPATH : $PYTHONPATH:$(toPythonPath "$out") \
|
||||||
|
--prefix PATH : ${binpath}
|
||||||
|
|
||||||
preFixupPhase = ''
|
bunzip2 $out/share/playonlinux/bin/check_dd_x86.bz2
|
||||||
for f in $out/bin/*; do
|
patchelf --set-interpreter $(cat ${ld32}) --set-rpath ${libs pkgsi686Linux} $out/share/playonlinux/bin/check_dd_x86
|
||||||
wrapProgram $f \
|
${if stdenv.system == "x86_64-linux" then ''
|
||||||
--prefix PYTHONPATH : $PYTHONPATH:$(toPythonPath "$out") \
|
bunzip2 $out/share/playonlinux/bin/check_dd_amd64.bz2
|
||||||
--prefix PATH : \
|
patchelf --set-interpreter $(cat ${ld64}) --set-rpath ${libs pkgs} $out/share/playonlinux/bin/check_dd_amd64
|
||||||
${cabextract}/bin:\
|
'' else ''
|
||||||
${gettext}/bin:\
|
rm $out/share/playonlinux/bin/check_dd_amd64.bz2
|
||||||
${glxinfo}/bin:\
|
''}
|
||||||
${gnupg1compat}/bin:\
|
|
||||||
${icoutils}/bin:\
|
|
||||||
${imagemagick}/bin:\
|
|
||||||
${netcat}/bin:\
|
|
||||||
${p7zip}/bin:\
|
|
||||||
${python}/bin:\
|
|
||||||
${unzip}/bin:\
|
|
||||||
${wget}/bin:\
|
|
||||||
${wine}/bin:\
|
|
||||||
${xdg-user-dirs}/bin:\
|
|
||||||
${xterm}/bin
|
|
||||||
|
|
||||||
done
|
|
||||||
|
|
||||||
for f in $out/share/playonlinux/bin/*; do
|
|
||||||
bunzip2 $f
|
|
||||||
done
|
|
||||||
'';
|
|
||||||
|
|
||||||
postFixupPhases = [ "postFixupPhase" ];
|
|
||||||
|
|
||||||
postFixupPhase = ''
|
|
||||||
for f in $out/share/playonlinux/bin/*; do
|
for f in $out/share/playonlinux/bin/*; do
|
||||||
bzip2 $f
|
bzip2 $f
|
||||||
done
|
done
|
||||||
|
@ -12560,7 +12560,9 @@ let
|
|||||||
inherit (ocamlPackages) findlib cryptokit yojson;
|
inherit (ocamlPackages) findlib cryptokit yojson;
|
||||||
};
|
};
|
||||||
|
|
||||||
playonlinux = callPackage ../applications/misc/playonlinux { };
|
playonlinux = callPackage ../applications/misc/playonlinux {
|
||||||
|
stdenv = stdenv_32bit;
|
||||||
|
};
|
||||||
|
|
||||||
shotcut = callPackage ../applications/video/shotcut { mlt = mlt-qt5; };
|
shotcut = callPackage ../applications/video/shotcut { mlt = mlt-qt5; };
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user