Merge pull request #329823 from ExpidusOS/fix/pkgsllvm/elfutils
[NixPkgs.git] / pkgs / by-name / fl / flashgbx / package.nix
blob550d1b377f1fccd2b9e8380aecf3cb2e26c54d5d
1 { lib
2 , python3Packages
3 , fetchFromGitHub
4 , makeDesktopItem
5 , copyDesktopItems
6 , qt6
7 }:
9 python3Packages.buildPythonApplication rec {
10   pname = "flashgbx";
11   version = "4.1";
13   src = fetchFromGitHub {
14     repo = "FlashGBX";
15     owner = "lesserkuma";
16     rev = "refs/tags/${version}";
17     hash = "sha256-4/f3K5MQBEIdYdcT2NudHJL+VyZT/hj9bw5tfJIco8w=";
18   };
20   desktopItems = [
21     (makeDesktopItem {
22       name = "flashgbx";
23       desktopName = "FlashGBX UI";
24       icon = "flashgbx";
25       exec = meta.mainProgram;
26       comment = "UI for reading and writing Game Boy and Game Boy Advance cartridges";
27       categories = [ "Utility" ];
28     })
29   ];
31   postInstall =
32   ''
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 = with python3Packages; [
45     pillow
46     pyserial
47     pyside6
48     python-dateutil
49     requests
50     setuptools
51     qt6.qtbase
52   ] ++ lib.optionals stdenv.isLinux [
53     qt6.qtwayland
54   ];
56   meta = with lib; {
57     description = "GUI for reading and writing GB and GBA cartridges with the GBxCart RW";
58     homepage = "https://github.com/lesserkuma/FlashGBX";
59     license = licenses.gpl3Only;
60     mainProgram = "flashgbx";
61     maintainers = with maintainers; [ grahamnorris ];
62   };