From 4842118dca70d18701a9816405fd6fabf45b676f Mon Sep 17 00:00:00 2001
From: K900 <me@0upti.me>
Date: Fri, 11 Oct 2024 22:43:01 +0300
Subject: [PATCH] decky-loader-prerelease: revive at 3.0.2-pre3

---
 overlay.nix                      |  2 +-
 pkgs/decky-loader/default.nix    |  4 ++--
 pkgs/decky-loader/prerelease.nix | 22 ++++++++++++++++++++++
 3 files changed, 25 insertions(+), 3 deletions(-)
 create mode 100644 pkgs/decky-loader/prerelease.nix

diff --git a/overlay.nix b/overlay.nix
index 42764be8..fb71a71c 100644
--- a/overlay.nix
+++ b/overlay.nix
@@ -92,5 +92,5 @@ rec {
   sdgyrodsu = final.callPackage ./pkgs/sdgyrodsu { };
 
   decky-loader = final.callPackage ./pkgs/decky-loader { };
-  decky-loader-prerelease = decky-loader;
+  decky-loader-prerelease = final.callPackage ./pkgs/decky-loader/prerelease.nix { };
 }
diff --git a/pkgs/decky-loader/default.nix b/pkgs/decky-loader/default.nix
index 6a6ab187..9f08e635 100644
--- a/pkgs/decky-loader/default.nix
+++ b/pkgs/decky-loader/default.nix
@@ -17,14 +17,14 @@ python3.pkgs.buildPythonPackage rec {
     hash = "sha256-IFop3SbXYCzYdHGRK08v8uPL4sSAHelCrIEc8HquZmg=";
   };
 
-  pyproject = true;
-
   pnpmDeps = pnpm.fetchDeps {
     inherit pname version src;
     sourceRoot = "${src.name}/frontend";
     hash = "sha256-IX7WI0q30Wa54sSpPQu9SarxijS9BQFgo6Lkw12E6GI=";
   };
 
+  pyproject = true;
+
   pnpmRoot = "frontend";
 
   nativeBuildInputs = [
diff --git a/pkgs/decky-loader/prerelease.nix b/pkgs/decky-loader/prerelease.nix
new file mode 100644
index 00000000..8ba11b08
--- /dev/null
+++ b/pkgs/decky-loader/prerelease.nix
@@ -0,0 +1,22 @@
+{ 
+  decky-loader,
+  fetchFromGitHub,
+  pnpm,
+}:
+decky-loader.overrideAttrs rec {
+  pname = "decky-loader";
+  version = "3.0.2-pre3";
+
+  src = fetchFromGitHub {
+    owner = "SteamDeckHomebrew";
+    repo = "decky-loader";
+    rev = "v${version}";
+    hash = "sha256-mWeGB2h0FB5AbUIt14d0S5f2GFYz00bFm3px6xFsQLo=";
+  };
+
+  pnpmDeps = pnpm.fetchDeps {
+    inherit pname version src;
+    sourceRoot = "${src.name}/frontend";
+    hash = "sha256-DG1+Drr0z0QfnGYDpJw+PpINjA9PM1Rij93ePqebDSE=";
+  };
+}