[phases.setup]
nixPkgs = [
    "imagemagick",
    # For PDF/PS operations
    "ghostscript",
    # For gem compilation
    "pkgconfig",
    # ImageMagick C library
    "libmagickwand",
    # Font configuration
    "fontconfig",
    # A good fallback font
    "dejavu_fonts",
    # Arial-compatible fonts
    "liberation_ttf",
    # Font rendering
    "freetype"
]

[phases.install]
dependsOn = ["setup"]

[phases.build]
dependsOn = ["install"]
cmds = [
    "mkdir -p public/assets/fonts",
    "cp -r app/assets/fonts/* public/assets/fonts/",
    "bundle exec rake assets:precompile"
]

[start]
cmd = "bin/rails server"
