Merge pull request #242569 from leo60228/pokefinder-4.1.1

pokefinder: 4.0.1 -> 4.1.1

authored by Sandro and committed by GitHub 1331644a 369fbaae

+50 -21
-12
pkgs/tools/games/pokefinder/cstddef.patch
··· 1 - diff --git a/Source/Core/Util/EncounterSlot.cpp b/Source/Core/Util/EncounterSlot.cpp 2 - index adddbdab..71c98e83 100644 3 - --- a/Source/Core/Util/EncounterSlot.cpp 4 - +++ b/Source/Core/Util/EncounterSlot.cpp 5 - @@ -20,6 +20,7 @@ 6 - #include "EncounterSlot.hpp" 7 - #include <Core/Enum/Encounter.hpp> 8 - #include <array> 9 - +#include <cstddef> 10 - 11 - namespace 12 - {
···
+38 -9
pkgs/tools/games/pokefinder/default.nix
··· 1 { lib 2 , stdenv 3 , fetchFromGitHub 4 , cmake 5 , qtbase 6 , qttools 7 , qtwayland 8 , wrapQtAppsHook 9 , gitUpdater 10 }: 11 12 stdenv.mkDerivation rec { 13 pname = "pokefinder"; 14 - version = "4.0.1"; 15 16 src = fetchFromGitHub { 17 owner = "Admiral-Fish"; 18 repo = "PokeFinder"; 19 rev = "v${version}"; 20 - sha256 = "j7xgjNF8NWLFVPNItWcFM5WL8yPxgHxVX00x7lt45WI="; 21 fetchSubmodules = true; 22 }; 23 24 - patches = [ ./cstddef.patch ]; 25 26 postPatch = '' 27 patchShebangs Source/Core/Resources/ 28 ''; 29 30 - installPhase = lib.optionalString (!stdenv.isDarwin) '' 31 - install -D Source/Forms/PokeFinder $out/bin/PokeFinder 32 - '' + lib.optionalString stdenv.isDarwin '' 33 mkdir -p $out/Applications 34 - cp -R Source/Forms/PokeFinder.app $out/Applications 35 ''; 36 37 - nativeBuildInputs = [ cmake wrapQtAppsHook ]; 38 39 buildInputs = [ qtbase qttools ] 40 ++ lib.optionals stdenv.isLinux [ qtwayland ]; 41 42 - passthru.updateScript = gitUpdater { }; 43 44 meta = with lib; { 45 homepage = "https://github.com/Admiral-Fish/PokeFinder";
··· 1 { lib 2 , stdenv 3 + , copyDesktopItems 4 + , makeDesktopItem 5 , fetchFromGitHub 6 , cmake 7 , qtbase 8 , qttools 9 , qtwayland 10 + , imagemagick 11 , wrapQtAppsHook 12 , gitUpdater 13 }: 14 15 stdenv.mkDerivation rec { 16 pname = "pokefinder"; 17 + version = "4.1.1"; 18 19 src = fetchFromGitHub { 20 owner = "Admiral-Fish"; 21 repo = "PokeFinder"; 22 rev = "v${version}"; 23 + sha256 = "fYBeWc9eYLbj4+ku1jwaO5ISL8a7WJnBHJ4qz4W8RHA="; 24 fetchSubmodules = true; 25 + # the repo has identical cmake and CMake folders, causing issues on macOS 26 + postFetch = if stdenv.isDarwin then '' 27 + mv $out/cmake $out/cmake.tmp 28 + mv $out/cmake.tmp $out/CMake 29 + '' else '' 30 + rm -rf $out/cmake 31 + ''; 32 }; 33 34 + patches = [ ./set-desktop-file-name.patch ]; 35 36 postPatch = '' 37 patchShebangs Source/Core/Resources/ 38 ''; 39 40 + installPhase = '' 41 + runHook preInstall 42 + '' + lib.optionalString (stdenv.isDarwin) '' 43 mkdir -p $out/Applications 44 + cp -R Source/PokeFinder.app $out/Applications 45 + '' + lib.optionalString (!stdenv.isDarwin) '' 46 + install -D Source/PokeFinder $out/bin/PokeFinder 47 + mkdir -p $out/share/pixmaps 48 + convert "$src/Source/Form/Images/pokefinder.ico[-1]" $out/share/pixmaps/pokefinder.png 49 + '' + '' 50 + runHook postInstall 51 ''; 52 53 + nativeBuildInputs = [ cmake wrapQtAppsHook ] ++ lib.optionals (!stdenv.isDarwin) [ copyDesktopItems imagemagick ]; 54 + 55 + desktopItems = [ 56 + (makeDesktopItem { 57 + name = "pokefinder"; 58 + exec = "PokeFinder"; 59 + icon = "pokefinder"; 60 + comment = "Cross platform Pokémon RNG tool"; 61 + desktopName = "PokéFinder"; 62 + categories = [ "Utility" ]; 63 + }) 64 + ]; 65 66 buildInputs = [ qtbase qttools ] 67 ++ lib.optionals stdenv.isLinux [ qtwayland ]; 68 69 + passthru.updateScript = gitUpdater { 70 + rev-prefix = "v"; 71 + }; 72 73 meta = with lib; { 74 homepage = "https://github.com/Admiral-Fish/PokeFinder";
+12
pkgs/tools/games/pokefinder/set-desktop-file-name.patch
···
··· 1 + diff --git a/Source/main.cpp b/Source/main.cpp 2 + index 3e58a381..2e7e4a86 100644 3 + --- a/Source/main.cpp 4 + +++ b/Source/main.cpp 5 + @@ -69,6 +69,7 @@ int main(int argc, char *argv[]) 6 + { 7 + QApplication a(argc, argv); 8 + a.setApplicationName("PokeFinder"); 9 + + a.setDesktopFileName("pokefinder"); 10 + a.setOrganizationName("PokeFinder Team"); 11 + 12 + Q_INIT_RESOURCE(resources);