Skip to content

Commit

Permalink
cyphernetes: init at v0.14.0
Browse files Browse the repository at this point in the history
  • Loading branch information
kshlm committed Jan 2, 2025
1 parent 043f8e5 commit f456664
Show file tree
Hide file tree
Showing 2 changed files with 93 additions and 0 deletions.
11 changes: 11 additions & 0 deletions maintainers/maintainer-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12366,6 +12366,11 @@
github = "krzaczek";
githubId = 5773701;
};
kshlm = {
name = "kshlm";
github = "kshlm";
githubId = 362086;
};
KSJ2000 = {
email = "[email protected]";
name = "KSJ2000";
Expand Down Expand Up @@ -21655,6 +21660,12 @@
githubId = 203168;
name = "Stefan Fehrenbach";
};
stefankeidel = {
email = "[email protected]";
github = "stefankeidel";
githubId = 1188614;
name = "Stefan Keidel";
};
stehessel = {
email = "[email protected]";
github = "stehessel";
Expand Down
82 changes: 82 additions & 0 deletions pkgs/by-name/cy/cyphernetes/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
{
lib,
buildGoModule,
fetchFromGitHub,
nodejs,
nix-update-script,
pnpm,
stdenvNoCC,
}:
let
pname = "cyphernetes";
version = "0.14.0";
src = fetchFromGitHub {
owner = "AvitalTamir";
repo = "cyphernetes";
tag = "v${version}";
hash = "sha256-rxZWI+2eWMNTjphxS+lsxAoZUXD8wWF1pfe6hLBxtuM=";
};

cyphernetes-web-ui =
let
pname = "cyphernetes-web-ui";
sourceRoot = "${src.name}/web";
in
stdenvNoCC.mkDerivation {
inherit
pname
version
src
sourceRoot
;

pnpmDeps = pnpm.fetchDeps {
inherit
pname
version
src
sourceRoot
;
hash = "sha256-3uOBSVA4oyPDj9GLiBSPQonalaSYveJ4II01GTfaAUw=";
};
nativeBuildInputs = [
nodejs
pnpm.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-DRzYgpHShZn+17R1Jj/arwAP5lyTpWelmwloUxT3n5Y=";
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;
};
}

0 comments on commit f456664

Please sign in to comment.