From c44b804901fee5b71690b2fe932979422400d47a Mon Sep 17 00:00:00 2001 From: Kamil Date: Wed, 8 Feb 2023 12:26:29 +0200 Subject: [PATCH 1/2] lens: move default.nix to linux.nix --- .../networking/cluster/lens/{default.nix => linux.nix} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename pkgs/applications/networking/cluster/lens/{default.nix => linux.nix} (100%) diff --git a/pkgs/applications/networking/cluster/lens/default.nix b/pkgs/applications/networking/cluster/lens/linux.nix similarity index 100% rename from pkgs/applications/networking/cluster/lens/default.nix rename to pkgs/applications/networking/cluster/lens/linux.nix From e4af93b2200ab4bc1a6c2de0754d93aab4e1d196 Mon Sep 17 00:00:00 2001 From: Kamil Date: Wed, 8 Feb 2023 12:27:29 +0200 Subject: [PATCH 2/2] lens: add aarch64-darwin support --- .../networking/cluster/lens/darwin.nix | 29 +++++++++++++++++++ .../networking/cluster/lens/default.nix | 6 ++++ 2 files changed, 35 insertions(+) create mode 100644 pkgs/applications/networking/cluster/lens/darwin.nix create mode 100644 pkgs/applications/networking/cluster/lens/default.nix diff --git a/pkgs/applications/networking/cluster/lens/darwin.nix b/pkgs/applications/networking/cluster/lens/darwin.nix new file mode 100644 index 000000000000..e64bcf8f95fc --- /dev/null +++ b/pkgs/applications/networking/cluster/lens/darwin.nix @@ -0,0 +1,29 @@ +{ lib, stdenv, undmg, fetchurl }: + +stdenv.mkDerivation rec { + pname = "lens"; + version = "2022.12"; + build = "${version}.11410-latest"; + 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" + cp -R . "$out/Applications/${appName}.app" + ''; + + meta = with lib; { + description = "The Kubernetes IDE"; + homepage = "https://k8slens.dev/"; + license = licenses.mit; + maintainers = with maintainers; [ dbirks ]; + platforms = [ "aarch64-darwin" ]; + }; +} diff --git a/pkgs/applications/networking/cluster/lens/default.nix b/pkgs/applications/networking/cluster/lens/default.nix new file mode 100644 index 000000000000..937c694e0e8e --- /dev/null +++ b/pkgs/applications/networking/cluster/lens/default.nix @@ -0,0 +1,6 @@ +{ stdenv, callPackage }: + +if stdenv.isDarwin then + callPackage ./darwin.nix { } +else + callPackage ./linux.nix { }