nixpkgs/pkgs/tools/games/pokefinder/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

74 lines
1.7 KiB
Nix
Raw Normal View History

2022-11-29 22:02:13 +00:00
{ lib
, stdenv
2023-07-10 02:28:52 +00:00
, copyDesktopItems
, makeDesktopItem
2022-11-29 22:02:13 +00:00
, fetchFromGitHub
, cmake
, qtbase
, qttools
2023-03-06 14:05:53 +00:00
, qtwayland
2023-07-10 02:28:52 +00:00
, imagemagick
2022-11-29 22:02:13 +00:00
, wrapQtAppsHook
, gitUpdater
}:
stdenv.mkDerivation rec {
pname = "pokefinder";
2023-08-10 03:07:28 +00:00
version = "4.1.2";
2022-11-29 22:02:13 +00:00
src = fetchFromGitHub {
owner = "Admiral-Fish";
repo = "PokeFinder";
rev = "v${version}";
2023-08-10 03:07:28 +00:00
sha256 = "ps8F6IcbCNybrZ02tbLNyB3YEvKlcYgCpv5Em7Riv+Q=";
2022-11-29 22:02:13 +00:00
fetchSubmodules = true;
};
2023-07-10 02:28:52 +00:00
patches = [ ./set-desktop-file-name.patch ];
2022-11-29 22:02:13 +00:00
postPatch = ''
patchShebangs Source/Core/Resources/
'';
2023-07-10 02:28:52 +00:00
installPhase = ''
runHook preInstall
'' + lib.optionalString (stdenv.isDarwin) ''
2023-01-24 03:53:00 +00:00
mkdir -p $out/Applications
2023-07-10 02:28:52 +00:00
cp -R Source/PokeFinder.app $out/Applications
'' + lib.optionalString (!stdenv.isDarwin) ''
install -D Source/PokeFinder $out/bin/PokeFinder
mkdir -p $out/share/pixmaps
convert "$src/Source/Form/Images/pokefinder.ico[-1]" $out/share/pixmaps/pokefinder.png
'' + ''
runHook postInstall
2022-11-29 22:02:13 +00:00
'';
2023-07-10 02:28:52 +00:00
nativeBuildInputs = [ cmake wrapQtAppsHook ] ++ lib.optionals (!stdenv.isDarwin) [ copyDesktopItems imagemagick ];
desktopItems = [
(makeDesktopItem {
name = "pokefinder";
exec = "PokeFinder";
icon = "pokefinder";
comment = "Cross platform Pokémon RNG tool";
desktopName = "PokéFinder";
categories = [ "Utility" ];
})
];
2022-11-29 22:02:13 +00:00
2023-03-06 14:05:53 +00:00
buildInputs = [ qtbase qttools ]
++ lib.optionals stdenv.isLinux [ qtwayland ];
2022-11-29 22:02:13 +00:00
2023-07-10 02:28:52 +00:00
passthru.updateScript = gitUpdater {
rev-prefix = "v";
};
2022-11-29 22:02:13 +00:00
meta = with lib; {
homepage = "https://github.com/Admiral-Fish/PokeFinder";
description = "Cross platform Pokémon RNG tool";
license = licenses.gpl3Only;
platforms = platforms.all;
maintainers = with maintainers; [ leo60228 ];
};
}