nixpkgs/pkgs/by-name/le/lens/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

42 lines
1.2 KiB
Nix

{ stdenv
, callPackage
, fetchurl
, lib }:
let
pname = "lens-desktop";
version = "2024.3.191333";
sources = {
x86_64-linux = {
url = "https://api.k8slens.dev/binaries/Lens-${version}-latest.x86_64.AppImage";
hash = "sha256-OywOjXzeW/5uyt50JrutiLgem9S1CrlwPFqfK6gUc7U=";
};
x86_64-darwin = {
url = "https://api.k8slens.dev/binaries/Lens-${version}-latest.dmg";
hash = "sha256-yf+WBcOdOM3XsfiXJThVws2r84vG2jwfNV1c+sq6A4s=";
};
aarch64-darwin = {
url = "https://api.k8slens.dev/binaries/Lens-${version}-latest-arm64.dmg";
hash = "sha256-hhd8MnwKWpvG7UebkeEoztS45SJVnpvvJ9Zy+y5swik=";
};
};
src = fetchurl {
inherit (sources.${stdenv.system} or (throw "Unsupported system: ${stdenv.system}")) url hash;
};
meta = with lib; {
description = "Kubernetes IDE";
homepage = "https://k8slens.dev/";
license = licenses.lens;
maintainers = with maintainers; [ dbirks RossComputerGuy starkca90 ];
platforms = builtins.attrNames sources;
};
in if stdenv.hostPlatform.isDarwin then
callPackage ./darwin.nix { inherit pname version src meta; }
else
callPackage ./linux.nix { inherit pname version src meta; }