diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 18032c354f0c14..c1d418fafbe618 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -12527,6 +12527,11 @@ github = "krzaczek"; githubId = 5773701; }; + kshlm = { + name = "kshlm"; + github = "kshlm"; + githubId = 362086; + }; KSJ2000 = { email = "katsho123@outlook.com"; name = "KSJ2000"; @@ -21970,6 +21975,12 @@ githubId = 203168; name = "Stefan Fehrenbach"; }; + stefankeidel = { + email = "stefan@keidel.me"; + github = "stefankeidel"; + githubId = 1188614; + name = "Stefan Keidel"; + }; stehessel = { email = "stephan@stehessel.de"; github = "stehessel"; diff --git a/pkgs/by-name/cy/cyphernetes/package.nix b/pkgs/by-name/cy/cyphernetes/package.nix new file mode 100644 index 00000000000000..71ed05cae21603 --- /dev/null +++ b/pkgs/by-name/cy/cyphernetes/package.nix @@ -0,0 +1,82 @@ +{ + lib, + buildGoModule, + fetchFromGitHub, + nodejs, + nix-update-script, + pnpm_9, + stdenvNoCC, +}: +let + pname = "cyphernetes"; + version = "0.15.3"; + src = fetchFromGitHub { + owner = "AvitalTamir"; + repo = "cyphernetes"; + tag = "v${version}"; + hash = "sha256-dNJo+6yXFwHU3k1CjloHWkUotsRYW3eJhkYeMmpvXYE="; + }; + + cyphernetes-web-ui = + let + pname = "cyphernetes-web-ui"; + sourceRoot = "${src.name}/web"; + in + stdenvNoCC.mkDerivation { + inherit + pname + version + src + sourceRoot + ; + + pnpmDeps = pnpm_9.fetchDeps { + inherit + pname + version + src + sourceRoot + ; + hash = "sha256-3uOBSVA4oyPDj9GLiBSPQonalaSYveJ4II01GTfaAUw="; + }; + nativeBuildInputs = [ + nodejs + pnpm_9.configHook + ]; + buildPhase = '' + runHook preBuild + pnpm build + runHook postBuild + ''; + installPhase = '' + runHook preInstall + mkdir -p $out + cp -R dist/* $out/ + runHook postInstall + ''; + }; +in +buildGoModule { + inherit pname version src; + vendorHash = "sha256-QthLrLhi+hWngtc11nyFPU63exHZ0mh3IWWa8YHXFPA="; + subPackages = [ "cmd/cyphernetes" ]; + doCheck = false; # Tests need a kubeconfig with an active context configured + preBuild = '' + cp -r ${cyphernetes-web-ui} cmd/cyphernetes/web/ + ''; + + passthru.updateScript = nix-update-script { }; + + meta = { + homepage = "https://cyphernet.es/"; + changelog = "https://github.com/AvitalTamir/cyphernetes/releases/tag/v${version}"; + description = "Kubernetes query language"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ + kshlm + stefankeidel + ]; + mainProgram = "cyphernetes"; + platforms = lib.platforms.linux ++ lib.platforms.darwin; + }; +}