11 pname = "jetbrains-toolbox";
12 version = "2.4.0.32175";
15 url = "https://download.jetbrains.com/toolbox/jetbrains-toolbox-${version}.tar.gz";
16 hash = "sha256-+EKl8o+S5nwV3u+RrhxuOm/6dLH6zRSvFnyaZRO8xc0=";
20 appimageContents = runCommand "${pname}-extracted"
22 nativeBuildInputs = [ appimageTools.appimage-exec ];
25 appimage-exec.sh -x $out ${src}/${pname}-${version}/${pname}
27 # JetBrains ship a broken desktop file. Despite registering a custom
28 # scheme handler for jetbrains:// URLs, they never mark the command as
29 # being suitable for passing URLs to. Ergo, the handler never receives
30 # its payload. This causes various things to break, including login.
31 # Reported upstream at: https://youtrack.jetbrains.com/issue/TBX-11478/
32 sed -Ei '/^Exec=/s/( %U)?$/ %U/' $out/jetbrains-toolbox.desktop
35 appimage = appimageTools.wrapAppImage {
36 inherit pname version;
37 src = appimageContents;
41 inherit pname version src appimage;
43 nativeBuildInputs = [ makeWrapper copyDesktopItems ];
48 install -Dm644 ${appimageContents}/.DirIcon $out/share/icons/hicolor/scalable/apps/jetbrains-toolbox.svg
49 makeWrapper ${appimage}/bin/${pname} $out/bin/${pname} \
50 --append-flags "--update-failed" \
51 --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [icu]}
56 desktopItems = [ "${appimageContents}/jetbrains-toolbox.desktop" ];
58 # Disabling the tests, this seems to be very difficult to test this app.
62 description = "Jetbrains Toolbox";
63 homepage = "https://jetbrains.com/";
64 license = licenses.unfree;
65 maintainers = with maintainers; [ AnatolyPopov ];
66 platforms = [ "x86_64-linux" ];
67 mainProgram = "jetbrains-toolbox";