2015-09-07 23:52:25 +02:00
|
|
|
{ stdenv
|
|
|
|
, makeWrapper
|
|
|
|
, fetchurl
|
|
|
|
, cabextract
|
|
|
|
, gettext
|
|
|
|
, glxinfo
|
2019-03-20 19:23:30 +01:00
|
|
|
, gnupg
|
2015-09-07 23:52:25 +02:00
|
|
|
, icoutils
|
|
|
|
, imagemagick
|
2016-10-30 02:52:47 +02:00
|
|
|
, netcat-gnu
|
2015-09-07 23:52:25 +02:00
|
|
|
, p7zip
|
2020-04-21 10:51:15 +02:00
|
|
|
, python2
|
2015-09-07 23:52:25 +02:00
|
|
|
, unzip
|
|
|
|
, wget
|
|
|
|
, wine
|
|
|
|
, xdg-user-dirs
|
|
|
|
, xterm
|
2015-12-09 21:28:31 +01:00
|
|
|
, pkgs
|
|
|
|
, pkgsi686Linux
|
2015-12-27 05:01:58 +01:00
|
|
|
, which
|
|
|
|
, curl
|
2019-02-25 20:37:23 +01:00
|
|
|
, jq
|
2019-03-06 23:39:21 +01:00
|
|
|
, xorg
|
|
|
|
, libGL
|
2015-09-07 23:52:25 +02:00
|
|
|
}:
|
|
|
|
|
2015-12-09 21:28:31 +01:00
|
|
|
let
|
2019-01-03 01:30:49 +01:00
|
|
|
version = "4.3.4";
|
2015-09-07 23:52:25 +02:00
|
|
|
|
2020-04-21 10:51:15 +02:00
|
|
|
binpath = stdenv.lib.makeBinPath [
|
|
|
|
cabextract
|
|
|
|
python
|
|
|
|
gettext
|
|
|
|
glxinfo
|
|
|
|
gnupg
|
|
|
|
icoutils
|
|
|
|
imagemagick
|
|
|
|
netcat-gnu
|
|
|
|
p7zip
|
|
|
|
unzip
|
|
|
|
wget
|
|
|
|
wine
|
|
|
|
xdg-user-dirs
|
|
|
|
xterm
|
|
|
|
which
|
|
|
|
curl
|
|
|
|
jq
|
|
|
|
];
|
2015-09-07 23:52:25 +02:00
|
|
|
|
2015-12-09 21:28:31 +01:00
|
|
|
ld32 =
|
2018-08-20 21:11:29 +02:00
|
|
|
if stdenv.hostPlatform.system == "x86_64-linux" then "${stdenv.cc}/nix-support/dynamic-linker-m32"
|
|
|
|
else if stdenv.hostPlatform.system == "i686-linux" then "${stdenv.cc}/nix-support/dynamic-linker"
|
|
|
|
else throw "Unsupported platform for PlayOnLinux: ${stdenv.hostPlatform.system}";
|
2015-12-09 21:28:31 +01:00
|
|
|
ld64 = "${stdenv.cc}/nix-support/dynamic-linker";
|
2019-03-06 23:53:24 +01:00
|
|
|
libs = pkgs: stdenv.lib.makeLibraryPath [ xorg.libX11 libGL ];
|
2015-12-09 21:28:31 +01:00
|
|
|
|
2020-04-21 10:51:15 +02:00
|
|
|
python = python2.withPackages(ps: with ps; [
|
|
|
|
wxPython
|
|
|
|
setuptools
|
|
|
|
]);
|
|
|
|
|
2015-12-09 21:28:31 +01:00
|
|
|
in stdenv.mkDerivation {
|
2019-08-13 23:52:01 +02:00
|
|
|
pname = "playonlinux";
|
|
|
|
inherit version;
|
2015-12-09 21:28:31 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://www.playonlinux.com/script_files/PlayOnLinux/${version}/PlayOnLinux_${version}.tar.gz";
|
2019-01-03 01:30:49 +01:00
|
|
|
sha256 = "019dvb55zqrhlbx73p6913807ql866rm0j011ix5mkk2g79dzhqp";
|
2015-12-09 21:28:31 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
2020-04-21 10:51:15 +02:00
|
|
|
buildInputs = [
|
|
|
|
xorg.libX11
|
|
|
|
libGL
|
|
|
|
python
|
|
|
|
];
|
2015-12-09 21:28:31 +01:00
|
|
|
|
2020-04-21 10:51:15 +02:00
|
|
|
postPatch = ''
|
2015-12-09 21:28:31 +01:00
|
|
|
patchShebangs python tests/python
|
2015-09-07 23:52:25 +02:00
|
|
|
sed -i "s/ %F//g" etc/PlayOnLinux.desktop
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
install -d $out/share/playonlinux
|
|
|
|
cp -r . $out/share/playonlinux/
|
|
|
|
|
|
|
|
install -D -m644 etc/PlayOnLinux.desktop $out/share/applications/playonlinux.desktop
|
|
|
|
|
2015-12-09 21:28:31 +01:00
|
|
|
makeWrapper $out/share/playonlinux/playonlinux $out/bin/playonlinux \
|
|
|
|
--prefix PATH : ${binpath}
|
2015-09-07 23:52:25 +02:00
|
|
|
|
2015-12-09 21:28:31 +01:00
|
|
|
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
|
2018-08-20 21:11:29 +02:00
|
|
|
${if stdenv.hostPlatform.system == "x86_64-linux" then ''
|
2015-12-09 21:28:31 +01:00
|
|
|
bunzip2 $out/share/playonlinux/bin/check_dd_amd64.bz2
|
|
|
|
patchelf --set-interpreter $(cat ${ld64}) --set-rpath ${libs pkgs} $out/share/playonlinux/bin/check_dd_amd64
|
|
|
|
'' else ''
|
|
|
|
rm $out/share/playonlinux/bin/check_dd_amd64.bz2
|
|
|
|
''}
|
2015-09-07 23:52:25 +02:00
|
|
|
for f in $out/share/playonlinux/bin/*; do
|
|
|
|
bzip2 $f
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "GUI for managing Windows programs under linux";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://www.playonlinux.com/";
|
2015-09-07 23:52:25 +02:00
|
|
|
license = licenses.gpl3;
|
|
|
|
maintainers = [ maintainers.a1russell ];
|
2015-12-11 15:24:31 +01:00
|
|
|
platforms = [ "x86_64-linux" "i686-linux" ];
|
2015-09-07 23:52:25 +02:00
|
|
|
};
|
|
|
|
}
|