@@ -0,0 +1,41 @@
1+From: Tobias Geerinckx-Rice <tobias.geerinckx.rice@gmail.com>
2+Date: Tue, 2 Jun 2015 13:04:19 +0200
3+Subject: [PATCH] Run `nix-env` & `nix-shell` with `--show-trace`
4+
5+Evaluation is broken often enough that this seems wise.
6+Debugging such errors without a backtrace is most unpleasant.
7+
8+diff -Naur nix-nox-0.0.1/nox/nixpkgs_repo.py nix-nox-0.0.1b/nox/nixpkgs_repo.py
9+--- nox/nox/nixpkgs_repo.py 2014-10-26 21:50:33.000000000 +0100
10++++ nox/nox/nixpkgs_repo.py 2015-07-03 04:46:08.114975479 +0200
11+@@ -75,7 +75,7 @@
12+
13+ def packages(path):
14+ """List all nix packages in the repo, as a set"""
15+- output = subprocess.check_output(['nix-env', '-f', path, '-qaP', '--drv-path'],
16++ output = subprocess.check_output(['nix-env', '-f', path, '-qaP', '--drv-path', '--show-trace'],
17+ universal_newlines=True)
18+ return set(output.split('\n'))
19+
20+diff -Naur nix-nox-0.0.1/nox/search.py nix-nox-0.0.1b/nox/search.py
21+--- nox/nox/search.py 2014-09-20 14:55:33.000000000 +0200
22++++ nox/nox/search.py 2015-07-03 04:46:54.264813143 +0200
23+@@ -10,7 +10,7 @@
24+
25+ def nix_packages_json():
26+ click.echo('Refreshing cache')
27+- output = subprocess.check_output(['nix-env', '-qa', '--json'],
28++ output = subprocess.check_output(['nix-env', '-qa', '--json', '--show-trace'],
29+ universal_newlines=True)
30+ return json.loads(output)
31+
32+@@ -70,7 +70,7 @@
33+ value_proc=parse_input)
34+ attributes = [p.attribute for p in packages]
35+ if action == 'install':
36+- subprocess.check_call(['nix-env', '-iA'] + attributes)
37++ subprocess.check_call(['nix-env', '-iA', '--show-trace'] + attributes)
38+ elif action == 'shell':
39+ attributes = [a[len('nixpkgs.'):] for a in attributes]
40+- subprocess.check_call(['nix-shell', '-p'] + attributes)
41++ subprocess.check_call(['nix-shell', '-p', '--show-trace'] + attributes)