Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 66 lines 1.4 kB view raw
1{ 2 lib, 3 python3Packages, 4 fetchFromGitHub, 5 makeDesktopItem, 6 copyDesktopItems, 7 qt6, 8}: 9 10python3Packages.buildPythonApplication rec { 11 pname = "flashgbx"; 12 version = "4.4"; 13 14 src = fetchFromGitHub { 15 repo = "FlashGBX"; 16 owner = "lesserkuma"; 17 tag = version; 18 hash = "sha256-C5RljQB6km5yYvFRj/s5AZfMIuMmaqsHnn9BhYWAP4o="; 19 }; 20 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 ]; 31 32 postInstall = '' 33 install -D FlashGBX/res/icon.png $out/share/icons/hicolor/256x256/apps/flashgbx.png 34 ''; 35 36 pyproject = true; 37 38 nativeBuildInputs = [ 39 python3Packages.setuptools 40 copyDesktopItems 41 qt6.wrapQtAppsHook 42 ]; 43 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 ]; 58 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 }; 66}