nixlab/config/services/kener-pkg.nix
2025-06-18 21:41:53 +01:00

45 lines
1.1 KiB
Nix

{ lib, buildNpmPackage, fetchFromGitHub }:
let
pname = "kener";
version = "3.2.12";
in
buildNpmPackage rec {
inherit pname version;
src = fetchFromGitHub {
owner = "rajnandan1";
repo = pname;
rev = "e6b5600a4726f719c2228d7d2da5a919e4bc15a3";
hash = "sha256-UBmt7SYZ2WukJvT1TOcwVr/L8RZVpVkLamCNV/xC8L4=";
};
npmDepsHash = "sha256-csB6qMJt3wBQyyWrK31F0FaRck3rt0JiH/lv77f+570=";
npmBuild = "npm run build";
# Copy src because the main runner (hosts the API etc) calls some stuff from it
installPhase = ''
mkdir $out
cp -R src/ $out
cp -R node_modules/ $out
cp -R build/ $out
cp -R migrations/ $out
cp -R seeds/ $out
cp -R static/ $out
cp -R knexfile.js $out
sed -i "s@./migrations@$out/migrations@g" $out/knexfile.js
sed -i "s@./seeds@$out/seeds@g" $out/knexfile.js
cp main.js $out
'';
meta = with lib; {
description = "Stunning status pages, batteries included!";
homepage = "https://kener.ing";
license = licenses.mit;
maintainers = with maintainers; [ nullishamy ];
mainProgram = "";
};
}