2
0
Files
liminix/pkgs/logshippers/default.nix

42 lines
794 B
Nix
Raw Normal View History

{
fetchurl,
writeFennel,
fennel,
fennelrepl,
runCommand,
lua,
anoia,
lualinux,
stdenv,
}:
let
2025-10-05 15:03:08 +01:00
name = "logshippers";
luafy = name : source :
writeFennel name {
packages = [ anoia lualinux fennel ];
macros = [ anoia.dev ];
mainFunction = "run";
} source;
incz = luafy name ./incz.fnl;
victorialogsend = luafy name ./victorialogsend.fnl;
in
stdenv.mkDerivation {
inherit name;
src = ./.;
buildInputs = [ lua ];
nativeBuildInputs = [ fennelrepl ];
buildPhase = ''
fennelrepl --test ./incz.fnl
fennelrepl --test ./victorialogsend.fnl
cp -p ${incz} incz
cp -p ${victorialogsend} victorialogsend
'';
installPhase = ''
install -D incz $out/bin/incz
install -D victorialogsend $out/bin/victorialogsend
'';
}