first failing test
This commit is contained in:
commit
459b1088c1
|
@ -0,0 +1,49 @@
|
|||
{ stdenv
|
||||
, callPackage
|
||||
, fennel
|
||||
, fetchFromGitHub
|
||||
, fetchurl
|
||||
, lib
|
||||
, lua53Packages
|
||||
, lua5_3
|
||||
}:
|
||||
let pname = "rover";
|
||||
lume = let lua = lua5_3; in lua53Packages.buildLuaPackage rec {
|
||||
pname = "lume";
|
||||
version = "1";
|
||||
src = fetchFromGitHub {
|
||||
repo = "lume"; owner = "rxi";
|
||||
rev = "98847e7812cf28d3d64b289b03fad71dc704547d";
|
||||
hash = "sha256-/u23EqgjjkU8FV9oXvMNXBkY8JAOJUhJAzXTSibJthU=";
|
||||
};
|
||||
buildPhase = ":";
|
||||
installPhase = ''
|
||||
mkdir -p "$out/share/lua/${lua.luaversion}"
|
||||
cp lume.lua "$out/share/lua/${lua.luaversion}"
|
||||
'';
|
||||
};
|
||||
|
||||
lua = lua5_3.withPackages (ps: with ps; [
|
||||
lgi
|
||||
luafilesystem
|
||||
luaposix
|
||||
readline
|
||||
lume
|
||||
]);
|
||||
fennel_ = lua.pkgs.fennel;
|
||||
in stdenv.mkDerivation rec {
|
||||
inherit pname;
|
||||
fennel = fennel_;
|
||||
|
||||
version = "0.1";
|
||||
src = lib.sources.cleanSource ./.;
|
||||
|
||||
buildInputs = [
|
||||
lua
|
||||
fennel
|
||||
];
|
||||
nativeBuildInputs = [
|
||||
lua
|
||||
];
|
||||
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
(local { : view } (require :fennel))
|
||||
|
||||
(fn rover [x y direction]
|
||||
{})
|
||||
|
||||
(let [r (rover 0 0 :n)]
|
||||
(match r
|
||||
{:x 0 :y 0 :direction :n} true
|
||||
_ (assert false (view r))))
|
Loading…
Reference in New Issue