Merge pull request #9708 from a1russell/playonlinux

Add playonlinux derivation.
This commit is contained in:
Arseniy Seroka 2015-09-09 12:28:46 +03:00
commit 2017d56edf
3 changed files with 117 additions and 0 deletions

View file

@ -7,6 +7,7 @@
so it's easy to ping a package @maintainer.
*/
a1russell = "Adam Russell <adamlr6+pub@gmail.com>";
abaldeau = "Andreas Baldeau <andreas@baldeau.net>";
abbradar = "Nikolay Amiantov <ab@fmap.me>";
adev = "Adrien Devresse <adev@adev.name>";

View file

@ -0,0 +1,114 @@
{ stdenv
, makeWrapper
, fetchurl
, wxPython
, libXmu
, cabextract
, gettext
, glxinfo
, gnupg1compat
, icoutils
, imagemagick
, netcat
, p7zip
, python
, unzip
, wget
, wine
, xdg-user-dirs
, xterm
}:
stdenv.mkDerivation rec {
name = "playonlinux-${version}";
version = "4.2.8";
src = fetchurl {
url = "https://www.playonlinux.com/script_files/PlayOnLinux/${version}/PlayOnLinux_${version}.tar.gz";
sha256 = "2ae8d5132706f3c697d0a53573c5835938dd042b620eb76790181b285797985c";
};
nativeBuildInputs = [ makeWrapper ];
buildInputs =
[ wxPython
libXmu
cabextract
gettext
glxinfo
gnupg1compat
icoutils
imagemagick
netcat
p7zip
python
unzip
wget
wine
xdg-user-dirs
xterm
];
patchPhase = ''
PYFILES="python/*.py python/lib/*.py tests/python/*.py"
sed -i "s/env python[0-9.]*/python/" $PYFILES
sed -i "s/ %F//g" etc/PlayOnLinux.desktop
'';
installPhase = ''
install -d $out/share/playonlinux
install -d $out/bin
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
'';
preFixupPhases = [ "preFixupPhase" ];
preFixupPhase = ''
for f in $out/bin/*; do
wrapProgram $f \
--prefix PYTHONPATH : $PYTHONPATH:$(toPythonPath "$out") \
--prefix PATH : \
${cabextract}/bin:\
${gettext}/bin:\
${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
bzip2 $f
done
'';
meta = with stdenv.lib; {
description = "GUI for managing Windows programs under linux";
homepage = https://www.playonlinux.com/;
license = licenses.gpl3;
maintainers = [ maintainers.a1russell ];
platforms = platforms.linux;
};
}

View file

@ -12308,6 +12308,8 @@ let
pig = callPackage ../applications/networking/cluster/pig { };
playonlinux = callPackage ../applications/misc/playonlinux { };
shotcut = callPackage ../applications/video/shotcut { mlt = mlt-qt5; };
smplayer = callPackage ../applications/video/smplayer { };