13 pname = "jetbrains-toolbox";
14 version = "2.5.1.34629";
17 url = "https://download.jetbrains.com/toolbox/jetbrains-toolbox-${version}.tar.gz";
18 hash = "sha256-YaMlvgktoa738grHarJX2Uh5PZ7qHuASyJBcUhMssEI=";
22 appimageContents = runCommand "${pname}-extracted"
24 nativeBuildInputs = [ appimageTools.appimage-exec ];
27 appimage-exec.sh -x $out ${src}/jetbrains-toolbox-${version}/jetbrains-toolbox
29 # JetBrains ship a broken desktop file. Despite registering a custom
30 # scheme handler for jetbrains:// URLs, they never mark the command as
31 # being suitable for passing URLs to. Ergo, the handler never receives
32 # its payload. This causes various things to break, including login.
33 # Reported upstream at: https://youtrack.jetbrains.com/issue/TBX-11478/
34 sed -Ei '/^Exec=/s/( %U)?$/ %U/' $out/jetbrains-toolbox.desktop
37 appimage = appimageTools.wrapAppImage {
38 inherit pname version;
39 src = appimageContents;
43 inherit pname version src appimage;
45 nativeBuildInputs = [ makeWrapper copyDesktopItems ];
50 install -Dm644 ${appimageContents}/.DirIcon $out/share/icons/hicolor/scalable/apps/jetbrains-toolbox.svg
51 makeWrapper ${appimage}/bin/jetbrains-toolbox $out/bin/jetbrains-toolbox \
52 --append-flags "--update-failed" \
53 --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [icu]}
58 desktopItems = [ "${appimageContents}/jetbrains-toolbox.desktop" ];
60 # Disabling the tests, this seems to be very difficult to test this app.
63 passthru.updateScript = genericUpdater {
64 versionLister = writeShellScript "jetbrains-toolbox-versionLister" ''
65 curl -Ls 'https://data.services.jetbrains.com/products?code=TBA&release.type=release' \
66 | jq -r '.[] | .releases | flatten[] | .build'
71 description = "Jetbrains Toolbox";
72 homepage = "https://jetbrains.com/";
73 license = licenses.unfree;
74 maintainers = with maintainers; [ AnatolyPopov ];
75 platforms = [ "x86_64-linux" ];
76 mainProgram = "jetbrains-toolbox";