expose lib in flake

This commit is contained in:
Dmitriy Pleshevskiy 2022-11-18 23:20:59 +03:00
parent 7cd935026e
commit 278a02cc87
Signed by: pleshevskiy
GPG key ID: 1B59187B161C0215
2 changed files with 6 additions and 4 deletions

View file

@ -5,7 +5,10 @@
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
{
lib = import ./lib.nix;
}
// flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };

View file

@ -24,7 +24,7 @@ let
else if isFloat val || isInt val then toString val
else if isBool val then toLuaBool val
else if isNull val then null
else null;
else throw "[nix2lua] Value '${toString val}' is not supported";
toLuaList = val:
wrapObj (excludeNull (map toLua val));
@ -43,8 +43,7 @@ let
validString = value:
if isString value then value
else throw "Value '${toString value}' is not a valid string";
else throw "[nix2lua] Value '${toString value}' is not a valid string";
in
{
inherit toLua;