teapot/examples/quickstart/default.nix
2025-05-14 19:24:31 -07:00

37 lines
No EOL
1.2 KiB
Nix

{ pkgs }: pkgs.brewTea {
name = "examples_quickstart";
version = "0.0.0";
src = ./.;
layoutSrc = ./layouts;
# maybe don't do this but its possible to reference _any file_.
defaultLayout = ./layouts/default.html;
# this could technically be a raw path; but nix doesn't keep directory name the same.
# use best judgement.
staticAssets = [ "./static" ];
markdollPlugins = let
sPoNgEbOb = pkgs.buildGoModule {
name = "sPoNgEbOb";
vendorHash = null;
src = pkgs.fetchFromGitHub {
repo = "sPoNgEbOb";
owner = "yzguy";
rev = "9e4bf8e86d5fd7870000832ff571acf13b6941eb";
hash = "sha256-MWVtW9gzYmx3sOSvPh9NI4h6MotuO1ZQyzC09jpsHJI=";
};
preBuild = ''
go mod init github.com/yzguy/sPoNgEbOb
'';
} + "/bin/sPoNgEbOb";
in [
# all of these add invoke handlers like [invoke(plural)(argv1):stdin]
(pkgs.mkMarkdollPlugin "plural" ./plugins/plural.sh)
((pkgs.mkMarkdollPlugin "tools" ./plugins/tools.py).override { buildInputs = [ pkgs.python3 ]; })
(pkgs.mkMarkdollPlugin "sPoNgEbOb" sPoNgEbOb)
# if your scripts need other things in path, they're sometimes best put here too.
];
}