make default.nix a function callable by callPackage
This commit is contained in:
parent
63232841cd
commit
a36876194d
13
default.nix
13
default.nix
@ -1,4 +1,9 @@
|
||||
with import <nixpkgs> {};
|
||||
{
|
||||
lua5_3
|
||||
, stdenv
|
||||
, fennel
|
||||
, makeWrapper
|
||||
}:
|
||||
let lua = lua5_3.withPackages (ps: [
|
||||
ps.dkjson
|
||||
ps.lpeg
|
||||
@ -6,7 +11,7 @@ let lua = lua5_3.withPackages (ps: [
|
||||
ps.luaposix
|
||||
]);
|
||||
inherit makeWrapper;
|
||||
fennel = pkgs.fennel.override { inherit lua; };
|
||||
myfennel = fennel.override { inherit lua; };
|
||||
in stdenv.mkDerivation {
|
||||
pname = "grafana-sms-alert";
|
||||
version = "0.1";
|
||||
@ -16,9 +21,9 @@ in stdenv.mkDerivation {
|
||||
lua_path="`lua -e 'print(package.path)'`"
|
||||
lua_cpath="`lua -e 'print(package.cpath)'`"
|
||||
|
||||
makeWrapper ${fennel}/bin/fennel $out/bin/grafana-sms-alert \
|
||||
makeWrapper ${myfennel}/bin/fennel $out/bin/grafana-sms-alert \
|
||||
--add-flags "$out/lib/main.fnl"
|
||||
'';
|
||||
buildInputs = [lua fennel];
|
||||
buildInputs = [lua myfennel];
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user