Skip to content

Commit

Permalink
beszel: init at 0.6.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Bot-wxt1221 committed Oct 29, 2024
1 parent f2af434 commit 9913bf1
Showing 1 changed file with 72 additions and 0 deletions.
72 changes: 72 additions & 0 deletions pkgs/by-name/be/beszel/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
{
buildGoModule,
lib,
fetchFromGitHub,
nix-update-script,
buildNpmPackage,
npm-lockfile-fix,
}:

buildGoModule rec {
pname = "beszel";
version = "0.6.2";

src = fetchFromGitHub {
owner = "henrygd";
repo = "beszel";
rev = "refs/tags/v${version}";
hash = "sha256-x9HU+sDjxRthC4ROJaKbuKHPHgxFSpyn/dywyGWE/v8=";
};

webui = buildNpmPackage {
inherit
pname
version
src
meta
;

npmFlags = [ "--legacy-peer-deps" ];

buildPhase = ''
runHook preBuild
node --max_old_space_size=1024000 ./node_modules/vite/bin/vite.js build
runHook postBuild
'';

installPhase = ''
runHook preInstall
mkdir -p $out
cp -r dist/* $out
runHook postInstall
'';

sourceRoot = "${src.name}/beszel/site";

npmDepsHash = "sha256-m6C1aHsojS/5VYTW7J0bPi1VL7QtKILVZnAgd3zNqxE=";
};

sourceRoot = "${src.name}/beszel";

vendorHash = "sha256-/FePQkqoeuH63mV81v1NxpFw9osMUCcZ1bP+0yN1Qlo=";

preBuild = ''
mkdir -p site/dist
cp -r ${webui}/* site/dist
'';

passthru.updateScript = nix-update-script { };

meta = {
homepage = "https://github.com/henrygd/beszel";
changelog = "https://github.com/henrygd/beszel/releases/tag/v${version}";
description = "Lightweight server monitoring hub with historical data, docker stats, and alerts";
maintainers = with lib.maintainers; [ bot-wxt1221 ];
license = lib.licenses.mit;
mainProgram = "hub";
};
}

0 comments on commit 9913bf1

Please sign in to comment.