16 url = "https://broth.itch.zone/butler/linux-amd64/15.21.0/butler.zip";
18 hash = "sha256-jHni/5qf7xST6RRonP2EW8fJ6647jobzrnHe8VMx4IA=";
21 itch-setup = fetchzip {
22 url = "https://broth.itch.ovh/itch-setup/linux-amd64/1.26.0/itch-setup.zip";
24 hash = "sha256-5MP6X33Jfu97o5R1n6Og64Bv4ZMxVM0A8lXeQug+bNA=";
27 sparseCheckout = "/release/images/itch-icons";
33 hash = "sha256-jugg+hdP0y0OkFhdQuEI9neWDuNf2p3+DQuwxe09Zck=";
34 sparseCheckout = [ sparseCheckout ];
38 stdenvNoCC.mkDerivation (finalAttrs: {
43 url = "https://broth.itch.ovh/itch/linux-amd64/${finalAttrs.version}/archive/default#.zip";
45 hash = "sha256-4k6afBgOKGs7rzXAtIBpmuQeeT/Va8/0bZgNYjuJhgI=";
61 "x-scheme-handler/itchio"
62 "x-scheme-handler/itch"
64 comment = "Install and play itch.io games easily";
65 categories = [ "Game" ];
69 # As taken from https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=itch-bin
73 mkdir -p $out/bin $out/share/itch/resources/app
74 cp -r resources/app "$out/share/itch/resources/"
76 install -Dm644 LICENSE -t "$out/share/licenses/$pkgname/"
77 install -Dm644 LICENSES.chromium.html -t "$out/share/licenses/$pkgname/"
79 for icon in ${icons}/icon*.png
81 iconsize="''${icon#${icons}/icon}"
82 iconsize="''${iconsize%.png}"
83 icondir="$out/share/icons/hicolor/''${iconsize}x''${iconsize}/apps/"
84 install -Dm644 "$icon" "$icondir/itch.png"
91 makeWrapper ${steam-run}/bin/steam-run $out/bin/itch \
92 --add-flags ${electron}/bin/electron \
93 --add-flags $out/share/itch/resources/app \
94 --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations --enable-wayland-ime=true}}" \
95 --set BROTH_USE_LOCAL butler,itch-setup \
96 --prefix PATH : ${butler}:${itch-setup}
100 description = "Best way to play itch.io games";
101 homepage = "https://github.com/itchio/itch";
102 changelog = "https://github.com/itchio/itch/releases/tag/v${version}-canary";
103 license = lib.licenses.mit;
104 platforms = lib.platforms.linux;
105 sourceProvenance = [ lib.sourceTypes.binaryBytecode ];
106 maintainers = with lib.maintainers; [ pasqui23 ];
107 mainProgram = "itch";