containers:

  sphinx:
    builder: nix
    parameters:
      config: default.nix
      attribute: sphinx

  ubuntu:
    builder: from_image
    uids: [0-1000, 65534]
    gids: [0-1000, 65534]
    parameters:
      url: http://cdimage.ubuntu.com/ubuntu-core/trusty/daily/current/trusty-core-amd64.tar.gz
    provision:
      set -ex;
      export PATH=/bin:/sbin:/usr/bin:/usr/sbin;
      export DEBIAN_FRONTEND=noninteractive;
      export LANG=en_US.UTF-8;
      sed -i '/universe/{s/^# //;}' /etc/apt/sources.list;
      apt-get update;
      apt-get -y install software-properties-common;
      apt-add-repository -y ppa:hansjorg/rust;
      apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 37FD5E80BD6B6386;
      apt-get update;
      apt-get -y install make checkinstall rust-0.11;
      rmdir /var/tmp;
      ln -sfT /tmp /var/tmp;


commands:
  build-docs:
    description: Build vagga documentation using sphinx
    container: sphinx
    work-dir: docs
    command: make

  build-deb-package:
    container: ubuntu
    write-mode: transient-hard-link-copy
    command:
    - checkinstall
    - --default
    - --maintainer=paul@colomiets.name
    - --pkglicense=MIT
    - --pkgname=vagga
    - --nodoc
    - make
    - -B
    - all
    - install

containers:

  sphinx:
    builder: nix
    parameters:
      config: default.nix
      attribute: sphinx

  ubuntu:
    builder: ubuntu
    uids: [0-1000, 65534]
    gids: [0-1000, 65534]
    parameters:
      repos: universe
      PPAs: hansjorg/rust
      additional_keys: 37FD5E80BD6B6386  # for rust
      packages: make checkinstall rust-0.11
    provision:
      export PATH=/bin;
      rmdir /var/tmp;
      ln -sfT /tmp /var/tmp;

commands:
  build-docs:
    description: Build vagga documentation using sphinx
    container: sphinx
    work-dir: docs
    command: make

  build-ubuntu-package:
    container: ubuntu
    write-mode: transient-hard-link-copy
    command:
    - checkinstall
    - --default
    - --maintainer=paul@colomiets.name
    - --pkglicense=MIT
    - --pkgname=vagga
    - --nodoc
    - make
    - -B
    - all
    - install

Use `ubuntu` builder for package building
Use `ubuntu` builder for package building
