ps2patchelf: init at 1.0.0

Co-authored-by: emaryn <197520219+emaryn@users.noreply.github.com>
Co-authored-by: Aleksana <alexander.huang.y@gmail.com>

+81
+1
pkgs/by-name/ps/ps2patchelf/deps.json
··· 1 + []
+40
pkgs/by-name/ps/ps2patchelf/package.nix
··· 1 + { 2 + fetchFromGitHub, 3 + buildDotnetModule, 4 + dotnetCorePackages, 5 + lib, 6 + }: 7 + 8 + buildDotnetModule rec { 9 + version = "1.0.0"; 10 + pname = "PS2PatchElf"; 11 + 12 + src = fetchFromGitHub { 13 + owner = "CaptainSwag101"; 14 + repo = "PS2PatchElf"; 15 + tag = "v${version}"; 16 + hash = "sha256-iQL3tT71UOEFIYBdf9BNLUM4++Fm9qEhr77NkMCZdrU="; 17 + }; 18 + 19 + patches = [ 20 + ./patches/target_net8.0.patch 21 + ./patches/fix_arg_check.patch 22 + ]; 23 + 24 + dotnet-sdk = dotnetCorePackages.sdk_8_0; 25 + dotnet-runtime = dotnetCorePackages.runtime_8_0; 26 + 27 + dotnetFlags = [ "-p:TargetFramework=net8.0" ]; 28 + 29 + nugetDeps = ./deps.json; 30 + 31 + projectFile = "PS2PatchElf/PS2PatchElf.csproj"; 32 + 33 + meta = { 34 + homepage = "https://github.com/CaptainSwag101/PS2PatchElf/"; 35 + description = "Very basic tool for converting PCSX2 .pnach cheats to game executable patches"; 36 + maintainers = [ lib.maintainers.gigahawk ]; 37 + mainProgram = "PS2PatchElf"; 38 + license = lib.licenses.mit; 39 + }; 40 + }
+14
pkgs/by-name/ps/ps2patchelf/patches/fix_arg_check.patch
··· 1 + diff --git a/PS2PatchElf/Program.cs b/PS2PatchElf/Program.cs 2 + index 8c0f1b4..78f4042 100644 3 + --- a/PS2PatchElf/Program.cs 4 + +++ b/PS2PatchElf/Program.cs 5 + @@ -9,7 +9,7 @@ namespace PS2PatchElf 6 + { 7 + static void Main(string[] args) 8 + { 9 + - if (args.Length is not 2 or 3) 10 + + if (args.Length != 2 && args.Length != 3) 11 + { 12 + Console.WriteLine("Improper number of arguments specified.\nPlease pass an input ELF/SLUS, a PNACH file, and optionally the patched ELF/SLUS's output path, in that order!"); 13 + return; 14 +
+26
pkgs/by-name/ps/ps2patchelf/patches/target_net8.0.patch
··· 1 + diff --git a/PS2PatchElf/PS2PatchElf.csproj b/PS2PatchElf/PS2PatchElf.csproj 2 + index 3bfd30f..bb0c835 100644 3 + --- a/PS2PatchElf/PS2PatchElf.csproj 4 + +++ b/PS2PatchElf/PS2PatchElf.csproj 5 + @@ -2,7 +2,7 @@ 6 + 7 + <PropertyGroup> 8 + <OutputType>Exe</OutputType> 9 + - <TargetFramework>net6.0</TargetFramework> 10 + + <TargetFramework>net8.0</TargetFramework> 11 + <Nullable>enable</Nullable> 12 + </PropertyGroup> 13 + 14 + diff --git a/PS2PatchLib/PS2PatchLib.csproj b/PS2PatchLib/PS2PatchLib.csproj 15 + index 4de8048..8d2b232 100644 16 + --- a/PS2PatchLib/PS2PatchLib.csproj 17 + +++ b/PS2PatchLib/PS2PatchLib.csproj 18 + @@ -1,7 +1,7 @@ 19 + <Project Sdk="Microsoft.NET.Sdk"> 20 + 21 + <PropertyGroup> 22 + - <TargetFramework>net6.0</TargetFramework> 23 + + <TargetFramework>net8.0</TargetFramework> 24 + <Nullable>enable</Nullable> 25 + </PropertyGroup> 26 +