customer-portal/nix/packages/flake-module.nix
chris 9b6811d3e7
All checks were successful
Test action / Print hello world (push) Successful in 7m48s
too lazy to think of a message, so enjoy this pointless text. Good luck future me...
2025-10-15 12:15:19 +00:00

61 lines
No EOL
1.7 KiB
Nix
Executable file

{ inputs, ... }:
{
perSystem = { self', system, pkgs, lib, ... }: {
packages = {
default = self'.packages.amarth-customer-portal;
amarth-customer-portal = inputs.bun2nix.lib.${system}.mkBunDerivation rec {
pname = "amarth-customer-portal";
version = "0.0.1";
index = "app.config.ts";
src = ../..;
bunNix = ../../bun.nix;
dontFixup = true;
# nativeBuildInputs = with pkgs; [];
buildPhase = ''
runHook preBuild
bun run build --bun
bun build --compile --target=bun-linux-x64 --minify --outfile ${pname} ./.output/server/index.mjs
runHook postBuild
'';
installPhase = ''
runHook preInstall
install -pDm755 -t $out/bin ${pname}
# cp -r ./.output/* $out
runHook postInstall
'';
meta = {
description = "Customer portal for Amarth cloud";
longDescription = ''
This is the application where customers of the cloud you are building with Amarth.
Your customer be able to manage there resources from within this portal.
This application is the equivalent of the Azure and AWS portals.
'';
homepage = "https://git.amarth.cloud";
changelog = "https://git.amarth.cloud/releases";
license = pkgs.lib.licenses.mit;
maintainers = [
{
name = "chris";
github = "chris-kruining";
githubId = 5786905;
}
];
platforms = pkgs.lib.platforms.all;
mainProgram = pname;
};
};
};
};
}