dependencies:
  cache_directories:
    - ~/nix_out
    - ./result
  override:
    - sudo mkdir -p /nix
    - sudo chown ubuntu /nix
    - mkdir -p /nix /etc/nix
    - chmod a+rwx /nix \
    - echo 'sandbox = false' > /etc/nix/nix.conf
    - curl https://nixos.org/nix/install | sh
    - echo "source ~/.nix-profile/etc/profile.d/nix.sh" >> ~/.circlerc
    - nix-channel --add https://nixos.org/channels/nixpkgs-unstable nixpkgs
    - nix-channel --update
    - nix-env -u
    - mkdir -p ~/nix_out

test:
  override:
    - nix-build

dependencies:
  cache_directories:
    - ~/nix_out
    - ./result
  override:
    - sudo mkdir -p /nix
    - sudo chown ubuntu /nix
    - sudo mkdir -p /nix /etc/nix
    - sudo chmod a+rwx /nix \
    - sudo sh -c "echo 'sandbox = false' > /etc/nix/nix.conf"
    - curl https://nixos.org/nix/install | sh
    - echo "source ~/.nix-profile/etc/profile.d/nix.sh" >> ~/.circlerc
    - nix-channel --add https://nixos.org/channels/nixpkgs-unstable nixpkgs
    - nix-channel --update
    - nix-env -u
    - mkdir -p ~/nix_out

test:
  override:
    - nix-build

FIX prepare nix config for Circle
FIX prepare nix config for Circle