[phases.setup]
nixPkgs = [
  "perl",
  "perlPackages.AppCpanminus",
  "git",
  "unzip",
  "tzdata",
  "joe",
  "gcc",
  "make",
  "perlPackages.ModuleBuild"
]

[phases.install]
cmds = [
  "git clone https://github.com/aspeer/WebDyne.git .",
  "cpanm --installdeps ."
]

[phases.build]
cmds = [
  "cd packer",
  "cpanm --installdeps .",
  "sh packer.sh",
  "cp packer/webdyne.psgi.pp /app/",
  "cp lib/WebDyne/time.psp /app/",
]

[start]
cmd = "/app/webdyne.psgi.pp /app/time.psp"

[variables]
DOCUMENT_ROOT = "~"

[ports]
start = 5000
