Show More
@@ -156,18 +156,6 b' let' | |||||
156 | then "${pkgs.glibcLocales}/lib/locale/locale-archive" |
|
156 | then "${pkgs.glibcLocales}/lib/locale/locale-archive" | |
157 | else ""; |
|
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 | preCheck = '' |
|
159 | preCheck = '' | |
172 | export PATH="$out/bin:$PATH" |
|
160 | export PATH="$out/bin:$PATH" | |
173 | ''; |
|
161 | ''; |
@@ -27,13 +27,13 b' let' | |||||
27 |
|
27 | |||
28 | hasVcsserver = !isNull vcsserver; |
|
28 | hasVcsserver = !isNull vcsserver; | |
29 |
|
29 | |||
30 | enterprise = import ./default.nix { |
|
30 | enterprise-ce = import ./default.nix { | |
31 | inherit pkgs doCheck; |
|
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 | # Avoid that we dump any sources into the store when entering the shell and |
|
37 | # Avoid that we dump any sources into the store when entering the shell and | |
38 | # make development a little bit more convenient. |
|
38 | # make development a little bit more convenient. | |
39 | src = null; |
|
39 | src = null; | |
@@ -41,17 +41,30 b' in enterprise.override (attrs: {' | |||||
41 | buildInputs = |
|
41 | buildInputs = | |
42 | attrs.buildInputs ++ |
|
42 | attrs.buildInputs ++ | |
43 | pkgs.lib.optionals (hasVcsserver) vcsserver.propagatedNativeBuildInputs ++ |
|
43 | pkgs.lib.optionals (hasVcsserver) vcsserver.propagatedNativeBuildInputs ++ | |
44 | (with pythonPackages; [ |
|
44 | (with ce-pythonPackages; [ | |
45 | bumpversion |
|
45 | bumpversion | |
46 | invoke |
|
46 | invoke | |
47 | ipdb |
|
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 | pkgs.lib.strings.optionalString (hasVcsserver) '' |
|
63 | pkgs.lib.strings.optionalString (hasVcsserver) '' | |
52 | # Setup the vcsserver development egg. |
|
64 | # Setup the vcsserver development egg. | |
53 | pushd ${vcsserverAbsPath} |
|
65 | pushd ${vcsserverAbsPath} | |
54 | python setup.py develop --prefix $tmp_path --allow-hosts "" |
|
66 | python setup.py develop --prefix $tmp_path --allow-hosts "" | |
55 | popd |
|
67 | popd | |
56 | ''; |
|
68 | ''; | |
|
69 | ||||
57 | }) |
|
70 | }) |
General Comments 0
You need to be logged in to leave comments.
Login now