grafana-sms-alert/default.nix

30 lines
666 B
Nix
Raw Normal View History

{
lua5_3
, stdenv
, fennel
, makeWrapper
}:
2022-09-13 19:55:15 +00:00
let lua = lua5_3.withPackages (ps: [
ps.dkjson
ps.lpeg
ps.http
ps.luaposix
]);
inherit makeWrapper;
myfennel = fennel.override { inherit lua; };
2022-09-13 19:55:15 +00:00
in stdenv.mkDerivation {
pname = "grafana-sms-alert";
version = "0.1";
src = ./.;
makeFlags = [ "TARGET=${placeholder "out"}" ];
postInstall = ''
lua_path="`lua -e 'print(package.path)'`"
lua_cpath="`lua -e 'print(package.cpath)'`"
makeWrapper ${myfennel}/bin/fennel $out/bin/grafana-sms-alert \
--add-flags "$out/lib/main.fnl"
'';
buildInputs = [lua myfennel];
nativeBuildInputs = [ makeWrapper ];
2022-09-13 19:55:15 +00:00
}