about summary refs log tree commit diff
path: root/pkgs/applications/networking/cluster/lens/darwin.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/networking/cluster/lens/darwin.nix')
-rw-r--r--pkgs/applications/networking/cluster/lens/darwin.nix33
1 files changed, 13 insertions, 20 deletions
diff --git a/pkgs/applications/networking/cluster/lens/darwin.nix b/pkgs/applications/networking/cluster/lens/darwin.nix
index e8f17422ec1ff..9b9b752b877ba 100644
--- a/pkgs/applications/networking/cluster/lens/darwin.nix
+++ b/pkgs/applications/networking/cluster/lens/darwin.nix
@@ -1,27 +1,20 @@
-{ lib, stdenv, undmg, fetchurl }:
-let
-  common = import ./common.nix { inherit fetchurl; };
-  inherit (stdenv.hostPlatform) system;
-in
-stdenv.mkDerivation rec {
-  inherit (common) pname version;
-  src = common.sources.${system} or (throw "Source for ${pname} is not available for ${system}");
+{ stdenv, pname, version, src, meta, undmg }:
 
-  appName = "Lens";
+stdenv.mkDerivation {
+  inherit pname version src meta;
 
-  sourceRoot = "${appName}.app";
+  sourceRoot = ".";
+
+  nativeBuildInputs = [ undmg ];
 
-  buildInputs = [ undmg ];
   installPhase = ''
-    mkdir -p "$out/Applications/${appName}.app"
-    cp -R . "$out/Applications/${appName}.app"
+    runHook preInstall
+
+    mkdir -p "$out/Applications"
+    cp -R "Lens.app" "$out/Applications/Lens.app"
+
+    runHook postInstall
   '';
 
-  meta = with lib; {
-    description = "The Kubernetes IDE";
-    homepage = "https://k8slens.dev/";
-    license = licenses.lens;
-    maintainers = with maintainers; [ dbirks ];
-    platforms = [ "x86_64-darwin" "aarch64-darwin" ];
-  };
+  dontFixup = true;
 }