jetbrains-toolbox: init at 1.27.3.14493

This commit is contained in:
Anatolii Popov 2022-12-15 17:09:16 +02:00 committed by Pol Dellaiera
parent 1bf544bf5e
commit 26bd3c74ac
No known key found for this signature in database
GPG key ID: D476DFE9C67467CA
2 changed files with 76 additions and 0 deletions

View file

@ -0,0 +1,74 @@
{ stdenv
, lib
, fetchzip
, copyDesktopItems
, makeDesktopItem
, makeWrapper
, runCommand
, appimageTools
, patchelf
}:
let
pname = "jetbrains-toolbox";
version = "1.27.3.14493";
src = fetchzip {
url = "https://download.jetbrains.com/toolbox/jetbrains-toolbox-${version}.tar.gz";
sha256 = "sha256-aK5T95Yg8Us8vkznWlDHnPiPAKiUtlU0Eswl9rD01VY=";
stripRoot = false;
};
appimageContents = runCommand "${pname}-extracted"
{
nativeBuildInputs = [ appimageTools.appimage-exec ];
}
''
appimage-exec.sh -x $out ${src}/${pname}-${version}/${pname}
'';
appimage = appimageTools.wrapAppImage {
inherit pname version;
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;
nativeBuildInputs = [ makeWrapper copyDesktopItems ];
installPhase = ''
runHook preInstall
install -Dm644 ${appimageContents}/.DirIcon $out/share/icons/hicolor/scalable/apps/jetbrains-toolbox.svg
makeWrapper ${appimage}/bin/${pname}-${version} $out/bin/${pname} --append-flags "--update-failed"
runHook postInstall
'';
desktopItems = [ desktopItem ];
# Disabling the tests, this seems to be very difficult to test this app.
doCheck = false;
meta = with lib; {
description = "Jetbrains Toolbox";
homepage = "https://jetbrains.com/";
license = licenses.unfree;
maintainers = with maintainers; [ AnatolyPopov ];
platforms = [ "x86_64-linux" ];
};
}

View file

@ -17081,6 +17081,8 @@ with pkgs;
infracost = callPackage ../tools/misc/infracost { };
jetbrains-toolbox = callPackage ../applications/misc/jetbrains-toolbox { };
msp430GccSupport = callPackage ../development/misc/msp430/gcc-support.nix { };
msp430Newlib = callPackage ../development/misc/msp430/newlib.nix { };