@@ -0,0 +1,40 @@
1+{ stdenv, lib, buildPythonApplication, fetchFromGitHub
2+, vdf, wine, winetricks, zenity
3+}:
4+
5+buildPythonApplication rec {
6+ pname = "protontricks";
7+ version = "1.2.3";
8+
9+ src = fetchFromGitHub {
10+ owner = "Matoking";
11+ repo = pname;
12+ rev = version;
13+ sha256 = "1v7bgr1rkm8j99s5bv45cslw01qcx8i8zb6ysfrb53qz86zgkgsn";
14+ };
15+
16+ propagatedBuildInputs = [ vdf ];
17+
18+ # The wine install shipped with Proton must run under steam's
19+ # chrootenv, but winetricks and zenity break when running under
20+ # it. See https://github.com/NixOS/nix/issues/902.
21+ #
22+ # The current workaround is to use wine from nixpkgs
23+ makeWrapperArgs = [
24+ "--set STEAM_RUNTIME 0"
25+ "--set-default WINE ${wine}/bin/wine"
26+ "--set-default WINESERVER ${wine}/bin/wineserver"
27+ "--prefix PATH : ${lib.makeBinPath [
28+ (winetricks.override { inherit wine; })
29+ zenity
30+ ]}"
31+ ];
32+
33+ meta = with stdenv.lib; {
34+ description = "A simple wrapper for running Winetricks commands for Proton-enabled games";
35+ homepage = https://github.com/Matoking/protontricks;
36+ license = licenses.gpl3;
37+ platforms = with platforms; linux;
38+ maintainers = with maintainers; [ metadark ];
39+ };
40+}