summary refs log tree commit diff
path: root/pkgs/tools/package-management/protontricks/default.nix
diff options
context:
space:
mode:
authorFrederik Rietdijk <fridh@fridh.nl>2019-07-22 14:15:32 +0200
committerFrederik Rietdijk <fridh@fridh.nl>2019-07-22 14:15:32 +0200
commitdb6c38a075fbac96fabcc7759aa6e6ddd5526b0c (patch)
tree77e9e366af73273bcec75e089999824a39f08496 /pkgs/tools/package-management/protontricks/default.nix
parent16dec3974696dd2a83865f017402ac9fdfb8cf8a (diff)
parent62cb4f72282b228a9072452448b0574170bebc06 (diff)
downloadnixpkgs-db6c38a075fbac96fabcc7759aa6e6ddd5526b0c.tar
nixpkgs-db6c38a075fbac96fabcc7759aa6e6ddd5526b0c.tar.gz
nixpkgs-db6c38a075fbac96fabcc7759aa6e6ddd5526b0c.tar.bz2
nixpkgs-db6c38a075fbac96fabcc7759aa6e6ddd5526b0c.tar.lz
nixpkgs-db6c38a075fbac96fabcc7759aa6e6ddd5526b0c.tar.xz
nixpkgs-db6c38a075fbac96fabcc7759aa6e6ddd5526b0c.tar.zst
nixpkgs-db6c38a075fbac96fabcc7759aa6e6ddd5526b0c.zip
Merge master into staging-next
Diffstat (limited to 'pkgs/tools/package-management/protontricks/default.nix')
-rw-r--r--pkgs/tools/package-management/protontricks/default.nix40
1 files changed, 40 insertions, 0 deletions
diff --git a/pkgs/tools/package-management/protontricks/default.nix b/pkgs/tools/package-management/protontricks/default.nix
new file mode 100644
index 00000000000..ae8dfc59075
--- /dev/null
+++ b/pkgs/tools/package-management/protontricks/default.nix
@@ -0,0 +1,40 @@
+{ stdenv, lib, buildPythonApplication, fetchFromGitHub
+, vdf, wine, winetricks, zenity
+}:
+
+buildPythonApplication rec {
+  pname = "protontricks";
+  version = "1.2.3";
+
+  src = fetchFromGitHub {
+    owner = "Matoking";
+    repo = pname;
+    rev = version;
+    sha256 = "1v7bgr1rkm8j99s5bv45cslw01qcx8i8zb6ysfrb53qz86zgkgsn";
+  };
+
+  propagatedBuildInputs = [ vdf ];
+
+  # The wine install shipped with Proton must run under steam's
+  # chrootenv, but winetricks and zenity break when running under
+  # it. See https://github.com/NixOS/nix/issues/902.
+  #
+  # The current workaround is to use wine from nixpkgs
+  makeWrapperArgs = [
+    "--set STEAM_RUNTIME 0"
+    "--set-default WINE ${wine}/bin/wine"
+    "--set-default WINESERVER ${wine}/bin/wineserver"
+    "--prefix PATH : ${lib.makeBinPath [
+      (winetricks.override { inherit wine; })
+      zenity
+    ]}"
+  ];
+
+  meta = with stdenv.lib; {
+    description = "A simple wrapper for running Winetricks commands for Proton-enabled games";
+    homepage = https://github.com/Matoking/protontricks;
+    license = licenses.gpl3;
+    platforms = with platforms; linux;
+    maintainers = with maintainers; [ metadark ];
+  };
+}