diff --git a/pkgs/applications/networking/cluster/lens/default.nix b/pkgs/applications/networking/cluster/lens/default.nix new file mode 100644 index 000000000000..656badfe5a0d --- /dev/null +++ b/pkgs/applications/networking/cluster/lens/default.nix @@ -0,0 +1,41 @@ +{ lib, fetchurl, appimageTools }: + +let + pname = "lens"; + version = "3.6.7"; + name = "${pname}-${version}"; + + src = fetchurl { + url = "https://github.com/lensapp/lens/releases/download/v${version}/Lens-${version}.AppImage"; + sha256 = "0var7d31ab6lq2vq6brk2dnhlnhqjp2gdqhygif567cdmcpn4vz8"; + name="${pname}.AppImage"; + }; + + appimageContents = appimageTools.extractType2 { + inherit name src; + }; + +in appimageTools.wrapType2 { + inherit name src; + + extraInstallCommands = + '' + mv $out/bin/${name} $out/bin/${pname} + + install -m 444 -D ${appimageContents}/kontena-lens.desktop $out/share/applications/${pname}.desktop + install -m 444 -D ${appimageContents}/usr/share/icons/hicolor/512x512/apps/kontena-lens.png \ + $out/share/icons/hicolor/512x512/apps/${pname}.png + + substituteInPlace $out/share/applications/${pname}.desktop \ + --replace 'Icon=kontena-lens' 'Icon=${pname}' \ + --replace 'Exec=AppRun' 'Exec=${pname}' + ''; + + meta = with lib; { + description = "The Kubernetes IDE"; + homepage = "https://k8slens.dev/"; + license = licenses.mit; + maintainers = with maintainers; [ dbirks ]; + platforms = [ "x86_64-linux" ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 3381a664bc31..5a34a9c019b6 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -22385,6 +22385,8 @@ in legit = gitAndTools.legit; + lens = callPackage ../applications/networking/cluster/lens { }; + leo-editor = libsForQt5.callPackage ../applications/editors/leo-editor { }; libowfat = callPackage ../development/libraries/libowfat { };