forked from DGNum/liminix
74cf3e0711
we use an ugly bit of C preprocessor to get the values from header files, because certain constants are different on MIPS than on other architectures
27 lines
582 B
Nix
27 lines
582 B
Nix
{
|
|
fennel
|
|
, stdenv
|
|
, linotify
|
|
, lua
|
|
, lualinux
|
|
, cpio
|
|
}:
|
|
let pname = "anoia";
|
|
in stdenv.mkDerivation {
|
|
inherit pname;
|
|
version = "0.1";
|
|
src = ./.;
|
|
nativeBuildInputs = [ fennel cpio ];
|
|
buildInputs = with lua.pkgs; [ linotify lualinux ];
|
|
outputs = [ "out" "dev" ];
|
|
|
|
doCheck = true;
|
|
|
|
installPhase = ''
|
|
mkdir -p "$out/share/lua/${lua.luaversion}/${pname}"
|
|
find . -name \*.lua | cpio -p -d "$out/share/lua/${lua.luaversion}/${pname}"
|
|
|
|
mkdir -p "$dev/share/lua/${lua.luaversion}/${pname}"
|
|
cp assert.fnl "$dev/share/lua/${lua.luaversion}/${pname}"
|
|
'';
|
|
}
|