Show More
@@ -79,8 +79,8 b' let' | |||||
79 | assert all isString (attrValues sourcesConfig); |
|
79 | assert all isString (attrValues sourcesConfig); | |
80 | sourcesConfig; |
|
80 | sourcesConfig; | |
81 |
|
81 | |||
|
82 | rhodecode-enterprise-ce-src = builtins.filterSource src-filter ./.; | |||
82 | version = builtins.readFile "${rhodecode-enterprise-ce-src}/rhodecode/VERSION"; |
|
83 | version = builtins.readFile "${rhodecode-enterprise-ce-src}/rhodecode/VERSION"; | |
83 | rhodecode-enterprise-ce-src = builtins.filterSource src-filter ./.; |
|
|||
84 |
|
84 | |||
85 | nodeEnv = import ./pkgs/node-default.nix { |
|
85 | nodeEnv = import ./pkgs/node-default.nix { | |
86 | inherit |
|
86 | inherit | |
@@ -125,6 +125,12 b' let' | |||||
125 | ''; |
|
125 | ''; | |
126 |
|
126 | |||
127 | releaseName = "RhodeCodeEnterpriseCE-${version}"; |
|
127 | releaseName = "RhodeCodeEnterpriseCE-${version}"; | |
|
128 | pythonWithEnv = | |||
|
129 | self.python.buildEnv.override { | |||
|
130 | extraLibs = [ ] ++ self.rhodecode-enterprise-ce.propagatedBuildInputs; | |||
|
131 | ignoreCollisions = true; | |||
|
132 | #--set PYTHONHASHSEED random TODO | |||
|
133 | }; | |||
128 | in super.rhodecode-enterprise-ce.override (attrs: { |
|
134 | in super.rhodecode-enterprise-ce.override (attrs: { | |
129 | inherit |
|
135 | inherit | |
130 | doCheck |
|
136 | doCheck | |
@@ -145,6 +151,7 b' let' | |||||
145 | pythonCommunityOverrides; |
|
151 | pythonCommunityOverrides; | |
146 |
|
152 | |||
147 | pythonPackages = self; |
|
153 | pythonPackages = self; | |
|
154 | rc_pkgs = pkgs; | |||
148 | }; |
|
155 | }; | |
149 |
|
156 | |||
150 | buildInputs = |
|
157 | buildInputs = | |
@@ -211,6 +218,12 b' let' | |||||
211 | cp configs/production.ini $out/etc |
|
218 | cp configs/production.ini $out/etc | |
212 | echo "[DONE ]: saved enterprise-ce production.ini into $out/etc" |
|
219 | echo "[DONE ]: saved enterprise-ce production.ini into $out/etc" | |
213 |
|
220 | |||
|
221 | echo "saving env in $out/etc/env_vars.txt" | |||
|
222 | touch $out/etc/env_vars.txt | |||
|
223 | echo "# RhodeCode build env vars" >> $out/etc/env_vars.txt | |||
|
224 | echo "LOCALE_ARCHIVE=\"${pkgs.glibcLocales}/lib/locale/locale-archive\"" >> $out/etc/env_vars.txt | |||
|
225 | echo "LC_ALL=\"en_US.UTF-8\"" >> $out/etc/env_vars.txt | |||
|
226 | ||||
214 | cp -Rf rhodecode/config/rcextensions $out/etc/rcextensions.tmpl |
|
227 | cp -Rf rhodecode/config/rcextensions $out/etc/rcextensions.tmpl | |
215 | echo "[DONE ]: saved enterprise-ce rcextensions into $out/etc/rcextensions.tmpl" |
|
228 | echo "[DONE ]: saved enterprise-ce rcextensions into $out/etc/rcextensions.tmpl" | |
216 |
|
229 | |||
@@ -218,27 +231,21 b' let' | |||||
218 | mkdir -p $out/bin |
|
231 | mkdir -p $out/bin | |
219 |
|
232 | |||
220 | # expose python |
|
233 | # expose python | |
221 |
ln -s ${ |
|
234 | ln -s ${pythonWithEnv}/bin/python $out/bin/ | |
222 |
|
235 | |||
223 | # required binaries from dependencies |
|
236 | # required binaries from dependencies | |
224 |
ln -s ${ |
|
237 | ln -s ${pythonWithEnv}/bin/supervisorctl $out/bin/ | |
225 |
ln -s ${ |
|
238 | ln -s ${pythonWithEnv}/bin/supervisord $out/bin/ | |
226 |
ln -s ${ |
|
239 | ln -s ${pythonWithEnv}/bin/paster $out/bin/ | |
227 |
ln -s ${ |
|
240 | ln -s ${pythonWithEnv}/bin/channelstream $out/bin/ | |
228 |
ln -s ${ |
|
241 | ln -s ${pythonWithEnv}/bin/celery $out/bin/ | |
229 |
ln -s ${ |
|
242 | ln -s ${pythonWithEnv}/bin/gunicorn $out/bin/ | |
230 |
ln -s ${ |
|
243 | ln -s ${pythonWithEnv}/bin/prequest $out/bin/ | |
231 |
ln -s ${ |
|
244 | ln -s ${pythonWithEnv}/bin/pserve $out/bin/ | |
232 |
|
245 | |||
233 | echo "[DONE ]: created symlinks into $out/bin" |
|
246 | echo "[DONE ]: created symlinks into $out/bin" | |
234 | DEPS="$out/bin/supervisorctl \ |
|
247 | DEPS=" | |
235 | $out/bin/supervisord \ |
|
248 | " | |
236 | $out/bin/paster \ |
|
|||
237 | $out/bin/channelstream \ |
|
|||
238 | $out/bin/celery \ |
|
|||
239 | $out/bin/gunicorn \ |
|
|||
240 | $out/bin/prequest \ |
|
|||
241 | $out/bin/pserve" |
|
|||
242 |
|
249 | |||
243 | # wrap only dependency scripts, they require to have full PYTHONPATH set |
|
250 | # wrap only dependency scripts, they require to have full PYTHONPATH set | |
244 | # to be able to import all packages |
|
251 | # to be able to import all packages | |
@@ -251,16 +258,16 b' let' | |||||
251 | done |
|
258 | done | |
252 |
|
259 | |||
253 | echo "[DONE ]: enterprise-ce binary wrapping" |
|
260 | echo "[DONE ]: enterprise-ce binary wrapping" | |
|
261 | ||||
254 | # rhodecode-tools don't need wrapping |
|
262 | # rhodecode-tools don't need wrapping | |
255 | ln -s ${self.rhodecode-tools}/bin/rhodecode-* $out/bin/ |
|
263 | ln -s ${self.rhodecode-tools}/bin/rhodecode-* $out/bin/ | |
256 |
|
264 | |||
257 | # expose sources of CE |
|
|||
258 | ln -s $out $out/etc/rhodecode_enterprise_ce_source |
|
|||
259 |
|
||||
260 | # expose static files folder |
|
265 | # expose static files folder | |
261 | cp -Rf $out/lib/${self.python.libPrefix}/site-packages/rhodecode/public/ $out/etc/static |
|
266 | cp -Rf $out/lib/${self.python.libPrefix}/site-packages/rhodecode/public/ $out/etc/static | |
262 | chmod 755 -R $out/etc/static |
|
267 | chmod 755 -R $out/etc/static | |
263 |
|
268 | |||
|
269 | # expose sources of rhodecode-enterprise-ce | |||
|
270 | ln -s $out $out/etc/rhodecode_enterprise_ce_source | |||
264 | ''; |
|
271 | ''; | |
265 |
|
272 | |||
266 | }); |
|
273 | }); |
@@ -14,4 +14,12 b' rec {' | |||||
14 | pythonPackages; |
|
14 | pythonPackages; | |
15 | }; |
|
15 | }; | |
16 |
|
16 | |||
|
17 | pip-tools = pythonPackages.pip-tools; | |||
|
18 | ||||
|
19 | setuptools = pythonPackages.setuptools; | |||
|
20 | ||||
|
21 | wheel = pythonPackages.wheel; | |||
|
22 | ||||
|
23 | pip = pythonPackages.pip; | |||
|
24 | ||||
17 | } |
|
25 | } |
@@ -26,7 +26,9 b' pkgs.stdenv.mkDerivation {' | |||||
26 | buildInputs = [ |
|
26 | buildInputs = [ | |
27 | # Allows to generate python packages |
|
27 | # Allows to generate python packages | |
28 | pip2nix.pip2nix |
|
28 | pip2nix.pip2nix | |
29 | pythonPackages.pip-tools |
|
29 | pip2nix.pip | |
|
30 | pip2nix.pip-tools | |||
|
31 | ||||
30 | # compile using ffi |
|
32 | # compile using ffi | |
31 | pkgs.libffi |
|
33 | pkgs.libffi | |
32 |
|
34 | |||
@@ -62,10 +64,10 b' pkgs.stdenv.mkDerivation {' | |||||
62 | export TMPDIR=/tmp |
|
64 | export TMPDIR=/tmp | |
63 | export LOCALE_ARCHIVE="${pkgs.glibcLocales}/lib/locale/locale-archive" |
|
65 | export LOCALE_ARCHIVE="${pkgs.glibcLocales}/lib/locale/locale-archive" | |
64 | export LC_ALL="en_US.UTF-8" |
|
66 | export LC_ALL="en_US.UTF-8" | |
|
67 | export PYCURL_SSL_LIBRARY=openssl | |||
|
68 | ||||
65 | # Custom prompt to distinguish from other dev envs. |
|
69 | # Custom prompt to distinguish from other dev envs. | |
66 | export PS1="\n\[\033[1;32m\][pip2nix-generate-shell]$\[\033[0m\] " |
|
70 | export PS1="\n\[\033[1;32m\][pip2nix-generate-shell]$\[\033[0m\] " | |
67 |
|
71 | |||
68 | export PYCURL_SSL_LIBRARY=openssl |
|
|||
69 |
|
||||
70 | ''; |
|
72 | ''; | |
71 | } |
|
73 | } |
General Comments 0
You need to be logged in to leave comments.
Login now