1
0
liminix/pkgs/watch-outputs/default.nix
Daniel Barlow 6649ebeccd firewall: use watch-outputs to track changes in zone->interface map
includes a horrible hack to work around (claimed (by me)) deficiencies
in the nftables parser
2025-02-28 00:43:20 +00:00

44 lines
665 B
Nix

{
fetchurl,
writeFennel,
fennel,
fennelrepl,
runCommand,
lua,
anoia,
linotify,
lualinux,
stdenv,
}:
let
name = "watch-outputs";
in
stdenv.mkDerivation {
inherit name;
src = ./.;
buildInputs = [ lua ];
nativeBuildInputs = [ fennelrepl ] ;
buildPhase = ''
fennelrepl --test ./watch-outputs.fnl
cp -p ${
writeFennel name {
packages = [
anoia
lualinux
linotify
fennel
];
macros = [ anoia.dev ];
mainFunction = "run";
} ./watch-outputs.fnl
} ${name}
make check
'';
installPhase = ''
install -D ${name} $out/bin/${name}
'';
}