yafc-ce: 2.6.0 -> 2.7.0 (#378873)
[NixPkgs.git] / pkgs / by-name / fl / flashgbx / package.nix
blob8e86ab8e11fc6f28d76da3ebb4231a55d93af865
2   lib,
3   python3Packages,
4   fetchFromGitHub,
5   makeDesktopItem,
6   copyDesktopItems,
7   qt6,
8 }:
10 python3Packages.buildPythonApplication rec {
11   pname = "flashgbx";
12   version = "4.3";
14   src = fetchFromGitHub {
15     repo = "FlashGBX";
16     owner = "lesserkuma";
17     tag = version;
18     hash = "sha256-jPD+7bFU6k1+NRKRHwynEmZ0G6ZwnF8AZVuTqk5DjEY=";
19   };
21   desktopItems = [
22     (makeDesktopItem {
23       name = "flashgbx";
24       desktopName = "FlashGBX UI";
25       icon = "flashgbx";
26       exec = meta.mainProgram;
27       comment = "UI for reading and writing Game Boy and Game Boy Advance cartridges";
28       categories = [ "Utility" ];
29     })
30   ];
32   postInstall = ''
33     install -D FlashGBX/res/icon.png $out/share/icons/hicolor/256x256/apps/flashgbx.png
34   '';
36   pyproject = true;
38   nativeBuildInputs = [
39     python3Packages.setuptools
40     copyDesktopItems
41     qt6.wrapQtAppsHook
42   ];
44   propagatedBuildInputs =
45     with python3Packages;
46     [
47       pillow
48       pyserial
49       pyside6
50       python-dateutil
51       requests
52       setuptools
53       qt6.qtbase
54     ]
55     ++ lib.optionals stdenv.hostPlatform.isLinux [
56       qt6.qtwayland
57     ];
59   meta = with lib; {
60     description = "GUI for reading and writing GB and GBA cartridges with the GBxCart RW";
61     homepage = "https://github.com/lesserkuma/FlashGBX";
62     license = licenses.gpl3Only;
63     mainProgram = "flashgbx";
64     maintainers = with maintainers; [ grahamnorris ];
65   };