2023-01-12 17:28:02 +00:00
|
|
|
{ lib, fetchurl, appimageTools, wrapGAppsHook, makeWrapper }:
|
2020-10-22 04:24:25 +00:00
|
|
|
|
|
|
|
let
|
|
|
|
pname = "lens";
|
2023-01-12 17:28:02 +00:00
|
|
|
version = "6.3.0";
|
|
|
|
build = "2022.12.221341-latest";
|
2020-10-22 04:24:25 +00:00
|
|
|
name = "${pname}-${version}";
|
|
|
|
|
|
|
|
src = fetchurl {
|
2021-08-26 14:38:14 +00:00
|
|
|
url = "https://api.k8slens.dev/binaries/Lens-${build}.x86_64.AppImage";
|
2023-01-12 17:28:02 +00:00
|
|
|
sha256 = "sha256-IJkm2Woz362jydFph9ek+5Jh2jtDH8kKvWoLQhTZPvc=";
|
2022-02-15 04:23:13 +00:00
|
|
|
name = "${pname}.AppImage";
|
2020-10-22 04:24:25 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
appimageContents = appimageTools.extractType2 {
|
|
|
|
inherit name src;
|
|
|
|
};
|
|
|
|
|
2022-02-15 04:23:13 +00:00
|
|
|
in
|
|
|
|
appimageTools.wrapType2 {
|
2020-10-22 04:24:25 +00:00
|
|
|
inherit name src;
|
|
|
|
|
|
|
|
extraInstallCommands =
|
|
|
|
''
|
|
|
|
mv $out/bin/${name} $out/bin/${pname}
|
2023-01-12 17:28:02 +00:00
|
|
|
source "${makeWrapper}/nix-support/setup-hook"
|
|
|
|
wrapProgram $out/bin/${pname} \
|
|
|
|
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}"
|
2021-08-26 14:38:14 +00:00
|
|
|
install -m 444 -D ${appimageContents}/lens.desktop $out/share/applications/${pname}.desktop
|
|
|
|
install -m 444 -D ${appimageContents}/usr/share/icons/hicolor/512x512/apps/lens.png \
|
|
|
|
$out/share/icons/hicolor/512x512/apps/${pname}.png
|
2020-10-22 04:24:25 +00:00
|
|
|
substituteInPlace $out/share/applications/${pname}.desktop \
|
2021-08-26 14:38:14 +00:00
|
|
|
--replace 'Icon=lens' 'Icon=${pname}' \
|
2020-10-22 04:24:25 +00:00
|
|
|
--replace 'Exec=AppRun' 'Exec=${pname}'
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "The Kubernetes IDE";
|
|
|
|
homepage = "https://k8slens.dev/";
|
|
|
|
license = licenses.mit;
|
2023-01-12 17:28:02 +00:00
|
|
|
maintainers = with maintainers; [ dbirks RossComputerGuy ];
|
2020-10-22 04:24:25 +00:00
|
|
|
platforms = [ "x86_64-linux" ];
|
|
|
|
};
|
|
|
|
}
|