nixpkgs/pkgs/applications/networking/cluster/lens/darwin.nix
Martin Wurm d79d7bdbf4 lens: Change lens' listed license from MIT to their own proprietary license.
Although Lens is based on a free core component ("OpenLens"), the tarballs
provided by Mirantis include a proprietary version of Lens that requires
a subscription.

As the proprietary option offers additional features, it would not be wise
to simply rewrite the derivation and base it on the FOSS source code.
Instead, implementing a new derivation for OpenLens is likely the better
approach.
2023-05-22 09:46:14 +00:00

30 lines
728 B
Nix

{ 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.lens;
maintainers = with maintainers; [ dbirks ];
platforms = [ "aarch64-darwin" ];
};
}