new package "devout", does nothing yet
This commit is contained in:
parent
450d3820b2
commit
349bfecbb8
4 changed files with 48 additions and 0 deletions
|
@ -56,6 +56,7 @@ in {
|
|||
# please keep the rest of this list alphabetised :-)
|
||||
|
||||
anoia = callPackage ./anoia {};
|
||||
devout = callPackage ./devout {};
|
||||
fennel = callPackage ./fennel {};
|
||||
fennelrepl = callPackage ./fennelrepl {};
|
||||
firewallgen = callPackage ./firewallgen {};
|
||||
|
|
25
pkgs/devout/default.nix
Normal file
25
pkgs/devout/default.nix
Normal file
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
lua
|
||||
, nellie
|
||||
, writeFennel
|
||||
, anoia
|
||||
, fennel
|
||||
, stdenv
|
||||
, fennelrepl
|
||||
}:
|
||||
stdenv.mkDerivation {
|
||||
name = "devout";
|
||||
src = ./.;
|
||||
checkInputs = [ fennelrepl ];
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp -p ${writeFennel "devout" {
|
||||
packages = [fennel anoia nellie lua.pkgs.luafilesystem];
|
||||
mainFunction = "run";
|
||||
} ./devout.fnl} $out/bin/devout
|
||||
'';
|
||||
checkPhase = ''
|
||||
fennelrepl ./test.fnl
|
||||
'';
|
||||
doCheck = true;
|
||||
}
|
2
pkgs/devout/devout.fnl
Normal file
2
pkgs/devout/devout.fnl
Normal file
|
@ -0,0 +1,2 @@
|
|||
|
||||
{ }
|
20
pkgs/devout/test.fnl
Normal file
20
pkgs/devout/test.fnl
Normal file
|
@ -0,0 +1,20 @@
|
|||
(import-macros { : expect= } :anoia.assert)
|
||||
|
||||
|
||||
(fn database []
|
||||
{
|
||||
:find (fn [terms] [])
|
||||
})
|
||||
|
||||
|
||||
(macro example [description & body]
|
||||
`(do ,body))
|
||||
|
||||
(example
|
||||
"given an empty database, search for some criteria matches no entries"
|
||||
(let [db (database)]
|
||||
(expect= (db:find {:partname "boot"}) [])))
|
||||
|
||||
|
||||
|
||||
(print "OK")
|
Loading…
Reference in a new issue