##// END OF EJS Templates
nix: further nix changes
marcink -
r4761:ffe072a3 python3
parent child Browse files
Show More
@@ -79,8 +79,8 b' let'
79 79 assert all isString (attrValues sourcesConfig);
80 80 sourcesConfig;
81 81
82 rhodecode-enterprise-ce-src = builtins.filterSource src-filter ./.;
82 83 version = builtins.readFile "${rhodecode-enterprise-ce-src}/rhodecode/VERSION";
83 rhodecode-enterprise-ce-src = builtins.filterSource src-filter ./.;
84 84
85 85 nodeEnv = import ./pkgs/node-default.nix {
86 86 inherit
@@ -125,6 +125,12 b' let'
125 125 '';
126 126
127 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 134 in super.rhodecode-enterprise-ce.override (attrs: {
129 135 inherit
130 136 doCheck
@@ -145,6 +151,7 b' let'
145 151 pythonCommunityOverrides;
146 152
147 153 pythonPackages = self;
154 rc_pkgs = pkgs;
148 155 };
149 156
150 157 buildInputs =
@@ -211,6 +218,12 b' let'
211 218 cp configs/production.ini $out/etc
212 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 227 cp -Rf rhodecode/config/rcextensions $out/etc/rcextensions.tmpl
215 228 echo "[DONE ]: saved enterprise-ce rcextensions into $out/etc/rcextensions.tmpl"
216 229
@@ -218,27 +231,21 b' let'
218 231 mkdir -p $out/bin
219 232
220 233 # expose python
221 ln -s ${self.python}/bin/python $out/bin/
234 ln -s ${pythonWithEnv}/bin/python $out/bin/
222 235
223 236 # required binaries from dependencies
224 ln -s ${self.supervisor}/bin/supervisorctl $out/bin/
225 ln -s ${self.supervisor}/bin/supervisord $out/bin/
226 ln -s ${self.pastescript}/bin/paster $out/bin/
227 ln -s ${self.channelstream}/bin/channelstream $out/bin/
228 ln -s ${self.celery}/bin/celery $out/bin/
229 ln -s ${self.gunicorn}/bin/gunicorn $out/bin/
230 ln -s ${self.pyramid}/bin/prequest $out/bin/
231 ln -s ${self.pyramid}/bin/pserve $out/bin/
237 ln -s ${pythonWithEnv}/bin/supervisorctl $out/bin/
238 ln -s ${pythonWithEnv}/bin/supervisord $out/bin/
239 ln -s ${pythonWithEnv}/bin/paster $out/bin/
240 ln -s ${pythonWithEnv}/bin/channelstream $out/bin/
241 ln -s ${pythonWithEnv}/bin/celery $out/bin/
242 ln -s ${pythonWithEnv}/bin/gunicorn $out/bin/
243 ln -s ${pythonWithEnv}/bin/prequest $out/bin/
244 ln -s ${pythonWithEnv}/bin/pserve $out/bin/
232 245
233 246 echo "[DONE ]: created symlinks into $out/bin"
234 DEPS="$out/bin/supervisorctl \
235 $out/bin/supervisord \
236 $out/bin/paster \
237 $out/bin/channelstream \
238 $out/bin/celery \
239 $out/bin/gunicorn \
240 $out/bin/prequest \
241 $out/bin/pserve"
247 DEPS="
248 "
242 249
243 250 # wrap only dependency scripts, they require to have full PYTHONPATH set
244 251 # to be able to import all packages
@@ -251,16 +258,16 b' let'
251 258 done
252 259
253 260 echo "[DONE ]: enterprise-ce binary wrapping"
261
254 262 # rhodecode-tools don't need wrapping
255 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 265 # expose static files folder
261 266 cp -Rf $out/lib/${self.python.libPrefix}/site-packages/rhodecode/public/ $out/etc/static
262 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 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 26 buildInputs = [
27 27 # Allows to generate python packages
28 28 pip2nix.pip2nix
29 pythonPackages.pip-tools
29 pip2nix.pip
30 pip2nix.pip-tools
31
30 32 # compile using ffi
31 33 pkgs.libffi
32 34
@@ -62,10 +64,10 b' pkgs.stdenv.mkDerivation {'
62 64 export TMPDIR=/tmp
63 65 export LOCALE_ARCHIVE="${pkgs.glibcLocales}/lib/locale/locale-archive"
64 66 export LC_ALL="en_US.UTF-8"
67 export PYCURL_SSL_LIBRARY=openssl
68
65 69 # Custom prompt to distinguish from other dev envs.
66 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