diff options
author | Adam Russell <adamlr6+pub@gmail.com> | 2015-09-07 16:52:25 -0500 |
---|---|---|
committer | Adam Russell <adamlr6+pub@gmail.com> | 2015-09-09 00:05:02 -0500 |
commit | 735673bb9ff37f210c1edf88006220e23726211d (patch) | |
tree | bd9ba425d21d78bea9ea450722a2a4fca39ab582 /pkgs/applications/misc/playonlinux | |
parent | f423ba3863092692f32a939f701d0eaf97afe9b2 (diff) | |
download | nixlib-735673bb9ff37f210c1edf88006220e23726211d.tar nixlib-735673bb9ff37f210c1edf88006220e23726211d.tar.gz nixlib-735673bb9ff37f210c1edf88006220e23726211d.tar.bz2 nixlib-735673bb9ff37f210c1edf88006220e23726211d.tar.lz nixlib-735673bb9ff37f210c1edf88006220e23726211d.tar.xz nixlib-735673bb9ff37f210c1edf88006220e23726211d.tar.zst nixlib-735673bb9ff37f210c1edf88006220e23726211d.zip |
playonlinux: init at 4.2.8
Diffstat (limited to 'pkgs/applications/misc/playonlinux')
-rw-r--r-- | pkgs/applications/misc/playonlinux/default.nix | 114 |
1 files changed, 114 insertions, 0 deletions
diff --git a/pkgs/applications/misc/playonlinux/default.nix b/pkgs/applications/misc/playonlinux/default.nix new file mode 100644 index 000000000000..a8f831fca64d --- /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; + }; +} |