##// END OF EJS Templates
nix: Move shell hook from default.nix -> shell.nix and set custom shell prompt.
Martin Bornhold -
r95:54363a6a default
parent child Browse files
Show More
@@ -93,21 +93,6 b' let'
93 93 pythonPackages = self;
94 94 };
95 95
96 # Somewhat snappier setup of the development environment
97 # TODO: move into shell.nix
98 # TODO: think of supporting a stable path again, so that multiple shells
99 # can share it.
100 shellHook = ''
101 # Set locale
102 export LC_ALL="en_US.UTF-8"
103
104 tmp_path=$(mktemp -d)
105 export PATH="$tmp_path/bin:$PATH"
106 export PYTHONPATH="$tmp_path/${self.python.sitePackages}:$PYTHONPATH"
107 mkdir -p $tmp_path/${self.python.sitePackages}
108 python setup.py develop --prefix $tmp_path --allow-hosts ""
109 '';
110
111 96 # Add VCSServer bin directory to path so that tests can find 'vcsserver'.
112 97 preCheck = ''
113 98 export PATH="$out/bin:$PATH"
@@ -9,10 +9,28 b' let'
9 9 pkgs;
10 10 };
11 11
12 vcs-pythonPackages = vcsserver.pythonPackages;
13
12 14 in vcsserver.override (attrs: {
13 15
14 16 # Avoid that we dump any sources into the store when entering the shell and
15 17 # make development a little bit more convenient.
16 18 src = null;
17 19
20 # Somewhat snappier setup of the development environment
21 # TODO: think of supporting a stable path again, so that multiple shells
22 # can share it.
23 postShellHook = ''
24 # Set locale
25 export LC_ALL="en_US.UTF-8"
26
27 # Custom prompt to distinguish from other dev envs.
28 export PS1="\n\[\033[1;32m\][VCS-shell:\w]$\[\033[0m\] "
29
30 tmp_path=$(mktemp -d)
31 export PATH="$tmp_path/bin:$PATH"
32 export PYTHONPATH="$tmp_path/${vcs-pythonPackages.python.sitePackages}:$PYTHONPATH"
33 mkdir -p $tmp_path/${vcs-pythonPackages.python.sitePackages}
34 python setup.py develop --prefix $tmp_path --allow-hosts ""
35 '';
18 36 })
General Comments 0
You need to be logged in to leave comments. Login now