From c25978aaa8fafb705d18320ab177ae442de86ecf Mon Sep 17 00:00:00 2001 From: matt1432 <matt@nelim.org> Date: Tue, 11 Feb 2025 14:29:23 -0500 Subject: [PATCH] feat(protonhax): use latest release instead of latest git --- apps/update-sources/src/app.ts | 5 +++++ flake.lock | 17 --------------- flake.nix | 6 ----- inputs/default.nix | 4 ---- packages/default.nix | 9 ++------ packages/protonhax/default.nix | 40 +++++++++++++++++++--------------- 6 files changed, 30 insertions(+), 51 deletions(-) diff --git a/apps/update-sources/src/app.ts b/apps/update-sources/src/app.ts index 9a7ca0bc..b2d079ce 100644 --- a/apps/update-sources/src/app.ts +++ b/apps/update-sources/src/app.ts @@ -71,6 +71,10 @@ const main = async() => { console.log(runNixUpdate('pam-fprint-grosshack')); } + if (args['ph'] || args['protonhax']) { + console.log(runNixUpdate('protonhax')); + } + if (args['s'] || args['some-sass-language-server']) { console.log(updateCustomPackage('some-sass-language-server')); } @@ -134,6 +138,7 @@ const main = async() => { updatePackage('homepage'); updatePackage('jmusicbot'); updatePackage('pam-fprint-grosshack'); + updatePackage('protonhax'); spawnSync('nixFastBuild', [], { diff --git a/flake.lock b/flake.lock index 4161cf2d..3b336c14 100644 --- a/flake.lock +++ b/flake.lock @@ -1648,22 +1648,6 @@ "type": "github" } }, - "protonhax-src": { - "flake": false, - "locked": { - "lastModified": 1724707175, - "narHash": "sha256-P6DVRz8YUF4JY2tiEVZx16FtK4i/rirRdKKZBslbJxU=", - "owner": "jcnils", - "repo": "protonhax", - "rev": "922a7bbade5a93232b3152cc20a7d8422db09c31", - "type": "github" - }, - "original": { - "owner": "jcnils", - "repo": "protonhax", - "type": "github" - } - }, "root": { "inputs": { "ags": "ags", @@ -1726,7 +1710,6 @@ "pokemon-colorscripts-src": "pokemon-colorscripts-src", "pr-tracker": "pr-tracker", "pre-commit-hooks": "pre-commit-hooks", - "protonhax-src": "protonhax-src", "secrets": "secrets", "sioyek-theme-src": "sioyek-theme-src", "smartinspect-src": "smartinspect-src", diff --git a/flake.nix b/flake.nix index baaf5b19..b4d67e4f 100644 --- a/flake.nix +++ b/flake.nix @@ -429,12 +429,6 @@ repo = "git-hooks.nix"; type = "github"; }; - protonhax-src = { - flake = false; - owner = "jcnils"; - repo = "protonhax"; - type = "github"; - }; secrets = { inputs = { nixpkgs.follows = "nixpkgs"; diff --git a/inputs/default.nix b/inputs/default.nix index 417e92db..cda66fa3 100644 --- a/inputs/default.nix +++ b/inputs/default.nix @@ -362,10 +362,6 @@ let owner = "gjsify"; repo = "ts-for-gir"; } - { - owner = "jcnils"; - repo = "protonhax"; - } # MPV scripts { diff --git a/packages/default.nix b/packages/default.nix index bffce819..25157a64 100644 --- a/packages/default.nix +++ b/packages/default.nix @@ -21,9 +21,7 @@ librespot-auth = pkgs.callPackage ./librespot-auth {}; - pam-fprint-grosshack = pkgs.callPackage ./pam-fprint-grosshack { - inherit (inputs) pam-fprint-grosshack-src; - }; + pam-fprint-grosshack = pkgs.callPackage ./pam-fprint-grosshack {}; piper = pkgs.callPackage ./piper { inherit (inputs) piper-src; @@ -36,10 +34,7 @@ proton-ge-latest = pkgs.callPackage ./proton-ge-latest {}; - protonhax = pkgs.callPackage ./protonhax { - inherit (inputs) protonhax-src; - inherit mkVersion; - }; + protonhax = pkgs.callPackage ./protonhax {}; repl = pkgs.callPackage ./repl {}; diff --git a/packages/protonhax/default.nix b/packages/protonhax/default.nix index b336c84e..6e9bd2d9 100644 --- a/packages/protonhax/default.nix +++ b/packages/protonhax/default.nix @@ -1,26 +1,32 @@ { # nix build inputs lib, - mkVersion, stdenv, - protonhax-src, + fetchFromGitHub, ... -}: -stdenv.mkDerivation { +}: let pname = "protonhax"; - version = mkVersion protonhax-src; + version = "1.0.5"; +in + stdenv.mkDerivation { + inherit pname version; - src = protonhax-src; + src = fetchFromGitHub { + owner = "jcnils"; + repo = "protonhax"; + rev = version; + hash = "sha256-5G4MCWuaF/adSc9kpW/4oDWFFRpviTKMXYAuT2sFf9w="; + }; - installPhase = '' - install -Dt $out/bin -m755 protonhax - ''; - - meta = { - license = with lib.licenses; [bsd3]; - homepage = "https://github.com/jcnils/protonhax"; - description = '' - Tool to help running other programs (i.e. Cheat Engine) inside Steam's proton. + installPhase = '' + install -Dt $out/bin -m755 protonhax ''; - }; -} + + meta = { + license = with lib.licenses; [bsd3]; + homepage = "https://github.com/jcnils/protonhax"; + description = '' + Tool to help running other programs (i.e. Cheat Engine) inside Steam's proton. + ''; + }; + }