You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

32 lines
785 B

{
lua5_3
, stdenv
, fennel
, makeWrapper
}:
let lua = lua5_3.withPackages (ps: [
ps.dkjson
ps.lpeg
ps.http
ps.luaposix
]);
inherit makeWrapper;
myfennel = fennel.override { inherit lua; };
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 "--add-fennel-path $out/lib/?.fnl" \
--add-flags "--add-package-path $out/lib/?.lua" \
--add-flags "$out/lib/main.fnl"
'';
buildInputs = [lua myfennel];
nativeBuildInputs = [ makeWrapper ];
}