Commit 38e5763

HPCesia <me@hpcesia.com>
2026-02-27 13:40:41
package: dwproton
1 parent 282e7dd
Changed files (2)
modules
pkgs
by-name
dwproton-bin
modules/game/lutris.nix
@@ -13,6 +13,7 @@
       };
     };
     proton-cachyos-bin_latest = pkgs.local.proton-cachyos-bin;
+    dwproton_latest = pkgs.local.dwproton-bin;
   in {
     programs.lutris = {
       enable = true;
@@ -22,6 +23,7 @@
         proton-ge-bin_latest
         proton-ge-bin_10-18
         proton-cachyos-bin_latest
+        dwproton_latest
       ];
       winePackages = [
         pkgs.wineWow64Packages.full
pkgs/by-name/dwproton-bin/package.nix
@@ -0,0 +1,54 @@
+# From https://github.com/powerofthe69/nix-gaming-edge
+{
+  pkgs,
+  renameInternalName ? true,
+}:
+pkgs.stdenv.mkDerivation {
+  pname = "dwproton";
+  version = "10.0-18";
+
+  src = pkgs.fetchurl {
+    url = "https://dawn.wine/dawn-winery/dwproton/releases/download/dwproton-10.0-18/dwproton-10.0-18-x86_64.tar.xz";
+    hash = "sha256-0uLfO2cyjwdSANBGu1Q07ObRcjz2h1K3Vsdnzep4BF8=";
+  };
+
+  nativeBuildInputs = [pkgs.xz];
+  outputs = [
+    "out"
+    "steamcompattool"
+  ];
+
+  installPhase = ''
+    runHook preInstall
+
+    # Create the steamcompat directory
+    mkdir -p $steamcompattool
+    cp -r ./* $steamcompattool/
+
+    # Modify the display name
+    sed -i -r "s|\"display_name\".*|\"display_name\" \"dwproton\"|" \
+      $steamcompattool/compatibilitytool.vdf
+
+    ${pkgs.lib.optionalString renameInternalName ''
+      sed -i -r 's|"dwproton-[^"]*"(\s*// Internal name)|"dwproton"\1|' $steamcompattool/compatibilitytool.vdf
+    ''}
+
+    # Create a real folder so that Steam doesn't require reselecting compatibility tool on update
+    mkdir -p $out/share/
+
+    # Create a real folder so that Steam doesn't require reselecting compatibility tool on update
+    mkdir -p $out/share/steam/compatibilitytools.d/dwproton
+
+    #Symlink the files INSIDE, not the folder itself. Oopsie
+    ln -s $steamcompattool/* $out/share/steam/compatibilitytools.d/dwproton/
+
+    runHook postInstall
+  '';
+
+  meta = with pkgs.lib; {
+    description = "Dawn Winery's custom Proton fork with fixes for various games";
+    homepage = "https://dawn.wine/dawn-winery/dwproton";
+    license = licenses.bsd3;
+    platforms = ["x86_64-linux"];
+  };
+}