diff --git a/pkgs/applications/misc/jetbrains-toolbox/default.nix b/pkgs/applications/misc/jetbrains-toolbox/default.nix index aae85f1e4384..1cb77d4e05f6 100644 --- a/pkgs/applications/misc/jetbrains-toolbox/default.nix +++ b/pkgs/applications/misc/jetbrains-toolbox/default.nix @@ -2,7 +2,6 @@ , lib , fetchzip , copyDesktopItems -, makeDesktopItem , makeWrapper , runCommand , appimageTools @@ -24,6 +23,13 @@ let } '' appimage-exec.sh -x $out ${src}/${pname}-${version}/${pname} + + # JetBrains ship a broken desktop file. Despite registering a custom + # scheme handler for jetbrains:// URLs, they never mark the command as + # being suitable for passing URLs to. Ergo, the handler never receives + # its payload. This causes various things to break, including login. + # Reported upstream at: https://youtrack.jetbrains.com/issue/TBX-11478/ + sed -Ei '/^Exec=/s/( %U)?$/ %U/' $out/jetbrains-toolbox.desktop ''; appimage = appimageTools.wrapAppImage { @@ -31,19 +37,6 @@ let src = appimageContents; extraPkgs = pkgs: (appimageTools.defaultFhsEnvArgs.targetPkgs pkgs); }; - - desktopItem = makeDesktopItem { - name = "JetBrains Toolbox"; - exec = "jetbrains-toolbox"; - comment = "JetBrains Toolbox"; - desktopName = "JetBrains Toolbox"; - type = "Application"; - icon = "jetbrains-toolbox"; - terminal = false; - categories = [ "Development" ]; - startupWMClass = "jetbrains-toolbox"; - startupNotify = false; - }; in stdenv.mkDerivation { inherit pname version src appimage; @@ -61,7 +54,7 @@ stdenv.mkDerivation { runHook postInstall ''; - desktopItems = [ desktopItem ]; + desktopItems = [ "${appimageContents}/jetbrains-toolbox.desktop" ]; # Disabling the tests, this seems to be very difficult to test this app. doCheck = false;