grafana-sms-alert/default.nix

25 lines
645 B
Nix
Raw Normal View History

2022-09-13 19:55:15 +00:00
with import <nixpkgs> {};
let lua = lua5_3.withPackages (ps: [
ps.dkjson
ps.lpeg
ps.http
ps.luaposix
]);
inherit makeWrapper;
fennel = pkgs.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 ${fennel}/bin/fennel $out/bin/grafana-sms-alert \
--add-flags "$out/lib/main.fnl"
'';
buildInputs = [lua fennel];
nativeBuildInputs = [ makeWrapper ];
2022-09-13 19:55:15 +00:00
}