diff --git a/lib/maintainers.nix b/lib/maintainers.nix index 8b9b1bc8a46..1c032dc1e1f 100644 --- a/lib/maintainers.nix +++ b/lib/maintainers.nix @@ -7,6 +7,7 @@ so it's easy to ping a package @maintainer. */ + a1russell = "Adam Russell "; abaldeau = "Andreas Baldeau "; abbradar = "Nikolay Amiantov "; adev = "Adrien Devresse "; diff --git a/pkgs/applications/misc/playonlinux/default.nix b/pkgs/applications/misc/playonlinux/default.nix new file mode 100644 index 00000000000..a8f831fca64 --- /dev/null +++ b/pkgs/applications/misc/playonlinux/default.nix @@ -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; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ad31d3f2d7b..6081197f2b3 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -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 { };