##// END OF EJS Templates
nix: Move shell hook: default.nix -> shell.nix and set custom prompt....
Martin Bornhold -
r1130:328807b4 default
parent child Browse files
Show More
@@ -156,18 +156,6 b' let'
156 156 then "${pkgs.glibcLocales}/lib/locale/locale-archive"
157 157 else "";
158 158
159 # Somewhat snappier setup of the development environment
160 # TODO: move into shell.nix
161 # TODO: think of supporting a stable path again, so that multiple shells
162 # can share it.
163 shellHook = ''
164 tmp_path=$(mktemp -d)
165 export PATH="$tmp_path/bin:$PATH"
166 export PYTHONPATH="$tmp_path/${self.python.sitePackages}:$PYTHONPATH"
167 mkdir -p $tmp_path/${self.python.sitePackages}
168 python setup.py develop --prefix $tmp_path --allow-hosts ""
169 '' + linkNodeAndBowerPackages;
170
171 159 preCheck = ''
172 160 export PATH="$out/bin:$PATH"
173 161 '';
@@ -27,13 +27,13 b' let'
27 27
28 28 hasVcsserver = !isNull vcsserver;
29 29
30 enterprise = import ./default.nix {
30 enterprise-ce = import ./default.nix {
31 31 inherit pkgs doCheck;
32 32 };
33 33
34 pythonPackages = enterprise.pythonPackages;
34 ce-pythonPackages = enterprise-ce.pythonPackages;
35 35
36 in enterprise.override (attrs: {
36 in enterprise-ce.override (attrs: {
37 37 # Avoid that we dump any sources into the store when entering the shell and
38 38 # make development a little bit more convenient.
39 39 src = null;
@@ -41,17 +41,30 b' in enterprise.override (attrs: {'
41 41 buildInputs =
42 42 attrs.buildInputs ++
43 43 pkgs.lib.optionals (hasVcsserver) vcsserver.propagatedNativeBuildInputs ++
44 (with pythonPackages; [
44 (with ce-pythonPackages; [
45 45 bumpversion
46 46 invoke
47 47 ipdb
48 48 ]);
49 49
50 shellHook = attrs.shellHook +
50 # Somewhat snappier setup of the development environment
51 # TODO: think of supporting a stable path again, so that multiple shells
52 # can share it.
53 postShellHook = ''
54 # Custom prompt to distinguish from other dev envs.
55 export PS1="\n\[\033[1;32m\][CE-shell:\w]$\[\033[0m\] "
56
57 tmp_path=$(mktemp -d)
58 export PATH="$tmp_path/bin:$PATH"
59 export PYTHONPATH="$tmp_path/${ce-pythonPackages.python.sitePackages}:$PYTHONPATH"
60 mkdir -p $tmp_path/${ce-pythonPackages.python.sitePackages}
61 python setup.py develop --prefix $tmp_path --allow-hosts ""
62 '' + enterprise-ce.linkNodeAndBowerPackages +
51 63 pkgs.lib.strings.optionalString (hasVcsserver) ''
52 64 # Setup the vcsserver development egg.
53 65 pushd ${vcsserverAbsPath}
54 66 python setup.py develop --prefix $tmp_path --allow-hosts ""
55 67 popd
56 68 '';
69
57 70 })
General Comments 0
You need to be logged in to leave comments. Login now