lens: 6.3.0 -> 6.5.2 (#242911)

This commit is contained in:
Diamondy Franc 2023-08-06 01:45:17 +03:00 committed by GitHub
parent 09464624dd
commit 54e6327e28
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 41 additions and 26 deletions

View file

@ -0,0 +1,22 @@
{ fetchurl }:
let
build = "2023.5.310801-latest";
in
{
pname = "lens-desktop";
version = "6.5.2";
sources = {
x86_64-darwin = fetchurl {
sha256 = "sha256-AGU1kOQEYBAGqWaxftqSNVdPEblPDujKSBjMeaVNx6M=";
url = "https://api.k8slens.dev/binaries/Lens-${build}.dmg";
};
aarch64-darwin = fetchurl {
sha256 = "sha256-Xx+6GPAfjioTrqfFS7cFh6deraR+TtqLlwLbVQxfN8g=";
url = "https://api.k8slens.dev/binaries/Lens-${build}-arm64.dmg";
};
x86_64-linux = fetchurl {
sha256 = "sha256-DPgeAhM8k6RXg1Qw2bqJFLPh5q2o7Va6EAe/InQNXLg=";
url = "https://api.k8slens.dev/binaries/Lens-${build}.x86_64.AppImage";
};
};
}

View file

@ -1,18 +1,16 @@
{ lib, stdenv, undmg, fetchurl }:
let
common = import ./common.nix { inherit fetchurl; };
inherit (stdenv.hostPlatform) system;
in
stdenv.mkDerivation rec {
pname = "lens";
version = "2022.12";
build = "${version}.11410-latest";
inherit (common) pname version;
src = common.sources.${system} or (throw "Source for ${pname} is not available for ${system}");
appName = "Lens";
sourceRoot = "${appName}.app";
src = fetchurl {
url = "https://api.k8slens.dev/binaries/Lens-${build}-arm64.dmg";
sha256 = "sha256-PKWJ2CZ/wacbJnrCZdYwYJzbFVhjIGAw60UGhdw11Mc=";
};
buildInputs = [ undmg ];
installPhase = ''
mkdir -p "$out/Applications/${appName}.app"
@ -24,6 +22,6 @@ stdenv.mkDerivation rec {
homepage = "https://k8slens.dev/";
license = licenses.lens;
maintainers = with maintainers; [ dbirks ];
platforms = [ "aarch64-darwin" ];
platforms = [ "x86_64-darwin" "aarch64-darwin" ];
};
}

View file

@ -1,5 +1,4 @@
{ stdenv, callPackage }:
if stdenv.isDarwin then
callPackage ./darwin.nix { }
else

View file

@ -1,21 +1,16 @@
{ lib, fetchurl, appimageTools, wrapGAppsHook, makeWrapper }:
{ lib, fetchurl, appimageTools, makeWrapper, nss_latest, stdenv }:
let
pname = "lens";
version = "6.3.0";
build = "2022.12.221341-latest";
name = "${pname}-${version}";
common = import ./common.nix { inherit fetchurl; };
src = fetchurl {
url = "https://api.k8slens.dev/binaries/Lens-${build}.x86_64.AppImage";
sha256 = "sha256-IJkm2Woz362jydFph9ek+5Jh2jtDH8kKvWoLQhTZPvc=";
name = "${pname}.AppImage";
};
inherit (stdenv.hostPlatform) system;
inherit (common) pname version;
src = common.sources.${stdenv.hostPlatform.system} or (throw "Source for ${pname} is not available for ${system}");
name = "${pname}-${version}";
appimageContents = appimageTools.extractType2 {
inherit name src;
};
in
appimageTools.wrapType2 {
inherit name src;
@ -26,14 +21,15 @@ appimageTools.wrapType2 {
source "${makeWrapper}/nix-support/setup-hook"
wrapProgram $out/bin/${pname} \
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}"
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 \
install -m 444 -D ${appimageContents}/${pname}.desktop $out/share/applications/${pname}.desktop
install -m 444 -D ${appimageContents}/usr/share/icons/hicolor/512x512/apps/${pname}.png \
$out/share/icons/hicolor/512x512/apps/${pname}.png
substituteInPlace $out/share/applications/${pname}.desktop \
--replace 'Icon=lens' 'Icon=${pname}' \
--replace 'Exec=AppRun' 'Exec=${pname}'
'';
extraPkgs = _: [ nss_latest ];
meta = with lib; {
description = "The Kubernetes IDE";
homepage = "https://k8slens.dev/";