15 , withGui ? false # build GUI version
18 rustPlatform.buildRustPackage rec {
22 src = fetchFromGitHub {
23 owner = "RainbowCookie32";
26 sha256 = "sha256-EGj9VVY+Zbmth7H1oTgq38KNLT/aWoTPn8k4sVkScgg=";
29 cargoPatches = [ ./fix-cargo-lock.patch ];
31 cargoHash = "sha256-8J92WtMmCTnghPqSmNYhG3IVdmpHsHEH7Fkod0UYKJU=";
33 # Tests require network access
38 ] ++ lib.optionals withGui [
45 ] ++ lib.optionals withGui [
60 buildNoDefaultFeatures = true;
61 buildFeatures = [ (if withGui then "egui" else "cli") ];
64 patchelf --set-rpath "${lib.makeLibraryPath buildInputs}" $out/bin/rusty-psn
65 '' + lib.optionalString withGui ''
66 mv $out/bin/rusty-psn $out/bin/rusty-psn-gui
69 desktopItem = lib.optionalString withGui (makeDesktopItem {
71 desktopName = "rusty-psn";
72 exec = "rusty-psn-gui";
73 comment = "A simple tool to grab updates for PS3 games, directly from Sony's servers using their updates API.";
85 desktopItems = lib.optionals withGui [ desktopItem ];
88 description = "Simple tool to grab updates for PS3 games, directly from Sony's servers using their updates API";
89 homepage = "https://github.com/RainbowCookie32/rusty-psn/";
90 license = licenses.mit;
91 platforms = [ "x86_64-linux" ];
92 maintainers = with maintainers; [ AngryAnt ];
93 mainProgram = "rusty-psn";