summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--maintainers/maintainer-list.nix5
-rw-r--r--pkgs/development/python-modules/vdf/default.nix24
-rw-r--r--pkgs/tools/package-management/protontricks/default.nix40
-rw-r--r--pkgs/top-level/all-packages.nix6
-rw-r--r--pkgs/top-level/python-packages.nix2
5 files changed, 77 insertions, 0 deletions
diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix
index 426113b7918..16da37d2f63 100644
--- a/maintainers/maintainer-list.nix
+++ b/maintainers/maintainer-list.nix
@@ -3272,6 +3272,11 @@
     email = "softs@metabarcoding.org";
     name = "Celine Mercier";
   };
+  metadark = {
+    email = "kira.bruneau@gmail.com";
+    name = "Kira Bruneau";
+    github = "metadark";
+  };
   mfossen = {
     email = "msfossen@gmail.com";
     github = "mfossen";
diff --git a/pkgs/development/python-modules/vdf/default.nix b/pkgs/development/python-modules/vdf/default.nix
new file mode 100644
index 00000000000..1c924d8973d
--- /dev/null
+++ b/pkgs/development/python-modules/vdf/default.nix
@@ -0,0 +1,24 @@
+{ stdenv, buildPythonPackage, fetchFromGitHub
+, pytest, pytestcov, mock }:
+
+buildPythonPackage rec {
+  pname = "vdf";
+  version = "3.1";
+
+  src = fetchFromGitHub {
+    owner = "ValvePython";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "19xqjq2159w2l9vaxlkickvy3zksp9ssdkvbfcfggxz31miwp1zr";
+  };
+
+  checkInputs = [ pytest pytestcov mock ];
+  checkPhase = "make test";
+
+  meta = with stdenv.lib; {
+    description = "Library for working with Valve's VDF text format";
+    homepage = https://github.com/ValvePython/vdf;
+    license = licenses.mit;
+    maintainers = with maintainers; [ metadark ];
+  };
+}
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 ];
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 03ae106c481..5841061c840 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -22028,6 +22028,12 @@ in
     gtk = pkgs.gtk3;
   };
 
+  protontricks = callPackage ../tools/package-management/protontricks {
+    inherit (python3Packages) buildPythonApplication vdf;
+    inherit (gnome3) zenity;
+    wine = wineWowPackages.minimal;
+  };
+
   stepmania = callPackage ../games/stepmania {
     ffmpeg = ffmpeg_2;
   };
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index fdff7d770db..c16b2f83ae3 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -1168,6 +1168,8 @@ in {
 
   pyunifi = callPackage ../development/python-modules/pyunifi { };
 
+  vdf = callPackage ../development/python-modules/vdf { };
+
   vidstab = callPackage ../development/python-modules/vidstab { };
 
   webapp2 = callPackage ../development/python-modules/webapp2 { };