fix package search path in wrapper

This commit is contained in:
Daniel Barlow 2022-09-16 23:21:07 +01:00
parent 07ee2a1b0e
commit 7a5017fd17
2 changed files with 5 additions and 5 deletions

View File

@ -21,7 +21,10 @@ in stdenv.mkDerivation {
lua_path="`lua -e 'print(package.path)'`"
lua_cpath="`lua -e 'print(package.cpath)'`"
makeWrapper ${myfennel}/bin/fennel $out/bin/grafana-sms-alert \
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];

View File

@ -1,5 +1,4 @@
(set _G.modem-spew io.stderr)
; (set _G.modem-spew io.stderr)
(local server (require :server))
(local webhook (require :webhook))
(local json (require :dkjson))
@ -13,8 +12,6 @@
(nil pos err) (error (.. "reading " filename ": " err)))))
(local { : view} (require :fennel))
;(print (view m) (view err))
(local sms ((. (require :sms) :new) { :smsc smsc :device device }))