liminix

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

default.nix (826B)


      1 {
      2   fetchurl,
      3   writeFennel,
      4   fennel,
      5   fennelrepl,
      6   runCommand,
      7   lua,
      8   anoia,
      9   lualinux,
     10   stdenv,
     11 }:
     12 let
     13   name = "logshippers";
     14   luafy =
     15     name: source:
     16     writeFennel name {
     17       packages = [
     18         anoia
     19         lualinux
     20         fennel
     21       ];
     22       macros = [ anoia.dev ];
     23       mainFunction = "run";
     24     } source;
     25   incz = luafy name ./incz.fnl;
     26   victorialogsend = luafy name ./victorialogsend.fnl;
     27 in
     28 stdenv.mkDerivation {
     29   inherit name;
     30   src = ./.;
     31 
     32   buildInputs = [ lua ];
     33   nativeBuildInputs = [ fennelrepl ];
     34 
     35   buildPhase = ''
     36     fennelrepl --test ./incz.fnl
     37     fennelrepl --test ./victorialogsend.fnl
     38     cp -p ${incz} incz
     39     cp -p ${victorialogsend} victorialogsend
     40   '';
     41 
     42   installPhase = ''
     43     install -D incz $out/bin/incz
     44     install -D victorialogsend $out/bin/victorialogsend
     45   '';
     46 }