7904c6bfe9
... and we need to figure out how to do transitive dependencies, because this is not a great experience
22 lines
459 B
Nix
22 lines
459 B
Nix
{
|
|
fennel
|
|
, stdenv
|
|
, lua
|
|
}:
|
|
let pname = "anoia";
|
|
in stdenv.mkDerivation {
|
|
inherit pname;
|
|
version = "0.1";
|
|
src = ./.;
|
|
nativeBuildInputs = [ fennel ];
|
|
buildInputs = with lua.pkgs; [ luafilesystem ];
|
|
buildPhase = ''
|
|
for f in *.fnl ; do
|
|
fennel --compile $f > `basename $f .fnl`.lua
|
|
done
|
|
'';
|
|
installPhase = ''
|
|
mkdir -p "$out/share/lua/${lua.luaversion}/${pname}"
|
|
cp *.lua "$out/share/lua/${lua.luaversion}/${pname}"
|
|
'';
|
|
}
|