summary refs log tree commit diff
path: root/maintainers/scripts/travis-nox-review-pr.sh
diff options
context:
space:
mode:
authorGeorges Dubus <georges.dubus@compiletoi.net>2014-09-21 13:09:35 +0200
committerGeorges Dubus <georges.dubus@compiletoi.net>2014-09-21 21:17:56 +0200
commit5ab79f6090d9b5b354ca559bbc02390ead087eba (patch)
tree0df9d53c139b54fe4ec4b07c02b90cdb967e07e8 /maintainers/scripts/travis-nox-review-pr.sh
parentc8ba9e285aee618663294e44b76cb868af6711dd (diff)
downloadnixpkgs-5ab79f6090d9b5b354ca559bbc02390ead087eba.tar
nixpkgs-5ab79f6090d9b5b354ca559bbc02390ead087eba.tar.gz
nixpkgs-5ab79f6090d9b5b354ca559bbc02390ead087eba.tar.bz2
nixpkgs-5ab79f6090d9b5b354ca559bbc02390ead087eba.tar.lz
nixpkgs-5ab79f6090d9b5b354ca559bbc02390ead087eba.tar.xz
nixpkgs-5ab79f6090d9b5b354ca559bbc02390ead087eba.tar.zst
nixpkgs-5ab79f6090d9b5b354ca559bbc02390ead087eba.zip
Review PR in travis with nox-review
Diffstat (limited to 'maintainers/scripts/travis-nox-review-pr.sh')
-rwxr-xr-xmaintainers/scripts/travis-nox-review-pr.sh26
1 files changed, 26 insertions, 0 deletions
diff --git a/maintainers/scripts/travis-nox-review-pr.sh b/maintainers/scripts/travis-nox-review-pr.sh
new file mode 100755
index 00000000000..8ba5a4f61cf
--- /dev/null
+++ b/maintainers/scripts/travis-nox-review-pr.sh
@@ -0,0 +1,26 @@
+#! /usr/bin/env bash
+set -e
+
+# Install Nix
+bash <(curl https://nixos.org/nix/install)
+source $HOME/.nix-profile/etc/profile.d/nix.sh
+
+# Make sure we can use hydra's binary cache
+sudo mkdir /etc/nix
+echo "binary-caches = http://cache.nixos.org http://hydra.nixos.org" | sudo tee /etc/nix/nix.conf
+echo "trusted-binary-caches = http://hydra.nixos.org" | sudo tee -a /etc/nix/nix.conf
+
+if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then
+    echo "Not a pull request, checking evaluation"
+    nix-env -f. -qaP --drv-path
+    exit 0
+fi
+
+echo "Installing nox"
+git clone https://github.com/madjar/nox
+pip install -e nox
+
+echo "Reviewing PR"
+# The current HEAD is the PR merged into origin/master, so we compare
+# against origin/master
+nox-review wip --against origin/master