Files
millerson-overlay.nix/packages/radar/package.nix
Alexander Miroshnichenko 1f3f0f468b
Some checks failed
CI / check (push) Has been cancelled
chore: update all packages to latest versions
- aionui 2.1.4 -> 2.1.50
- desloppify 0.9.15 -> 1.0
- ds4 -> 2026-08-05 (b030961)
- freebuff 0.0.85 -> 0.0.142 (binary moved to GitHub releases)
- graphify 0.7.10 -> 0.9.35 (license Apache-2.0, fix sed patterns for versioned deps)
- hipengine 0.2.2 -> 0.3.0 (console script renamed to hipengine)
- kubernetes-mcp-server 0.0.62 -> 0.0.66 (requires go >= 1.26.3)
- mcp-gateway 2.11.0 -> 3.4.0 (requires rustc >= 1.95)
- omniroute 3.8.28 -> 3.8.49
- radar 1.6.1 -> 1.9.1 (drop obsolete lockfile sed patch)
- relay-free-llm -> 96e6c48, cerebras-cloud-sdk 1.67.0 -> 1.91.0
- stakpak 0.3.86 -> 0.3.88

Add nixpkgs-latest input for toolchains newer than the pinned nixpkgs.
2026-08-07 16:04:10 +03:00

100 lines
2.2 KiB
Nix

{
lib,
buildGoModule,
buildNpmPackage,
fetchFromGitHub,
}:
let
version = "1.9.1";
src = fetchFromGitHub {
owner = "skyhook-io";
repo = "radar";
rev = "v${version}";
hash = "sha256-VZLzmxW86yMtYILhmKswkj57KD4Z+8ILwHKiO53YMWE=";
};
# Build the frontend as a separate derivation.
# The lockfile has some workspace packages without resolved URLs,
# so we patch them in postPatch before fetching dependencies.
frontend = buildNpmPackage {
pname = "radar-frontend";
inherit version src;
sourceRoot = "source";
# Upstream lockfile ships complete resolved/integrity fields for all
# packages since v1.9.x, so no lockfile patching is needed anymore.
npmDepsHash = "sha256-9xS5ChQ1xBix/n9N8vyBsHlHYmYXsibTK5J+X6mRgM4=";
npmDepsFetcherVersion = 2;
makeCacheWritable = true;
doCheck = false;
# Build the web workspace and install its output
buildPhase = ''
runHook preBuild
cd web
HOME=$TMPDIR ../node_modules/.bin/vite build
cd ..
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir -p $out
cp -r web/dist/* $out/
runHook postInstall
'';
};
in
buildGoModule {
pname = "radar";
inherit version src;
vendorHash = "sha256-d26tlh+Twv9GFX6NmR25Q9OpP/pUL2T4grdncQHYSg4=";
# Copy pre-built frontend assets before Go compilation for go:embed
preBuild = ''
mkdir -p internal/static/dist
cp -r ${frontend}/* internal/static/dist/
'';
env.CGO_ENABLED = 0;
ldflags = [
"-s"
"-w"
"-X main.version=v${version}"
];
subPackages = [ "cmd/explorer" ];
doCheck = false;
postInstall = ''
ln -s $out/bin/explorer $out/bin/radar
'';
passthru = {
category = "Kubernetes";
inherit frontend;
updateScript = [
"nix-update"
"--flake"
".#radar"
];
};
meta = with lib; {
description = "Modern Kubernetes visibility topology, event timeline, service traffic, resource browsing, Helm management, and GitOps support";
homepage = "https://github.com/skyhook-io/radar";
changelog = "https://github.com/skyhook-io/radar/releases/tag/v${version}";
license = licenses.asl20;
mainProgram = "radar";
platforms = platforms.linux;
};
}