imap-notify

run a command when email is received
git clone git://jb55.com/imap-notify
Log | Files | Refs | README

default.nix (579B)


      1 { stdenv, lib, makeWrapper, nodejs }:
      2 
      3 stdenv.mkDerivation rec {
      4   pname = "imap-notify";
      5   version = "0.1.1";
      6 
      7   src = ./.;
      8 
      9   makeFlags = "PREFIX=$(out)";
     10 
     11   phases = ["installPhase"];
     12 
     13   buildInputs = [ makeWrapper ];
     14 
     15   installPhase = ''
     16     mkdir -p $out/bin
     17     cp $src/index.js $out/bin/imap-notify
     18     wrapProgram $out/bin/imap-notify \
     19       --prefix PATH : "${nodejs}/bin"
     20   '';
     21 
     22   meta = with lib; {
     23     description = "imap-notify";
     24     homepage = "https://github.com/jb55/imap-notify";
     25     maintainers = with maintainers; [ jb55 ];
     26     license = licenses.mit;
     27   };
     28 }