##// END OF EJS Templates
js: use builtin packages for binaries...
marcink -
r3162:6f71dda2 default
parent child Browse files
Show More

The requested changes are too big and content was truncated. Show full diff

@@ -1,66 +1,67 b''
1 syntax: glob
1 syntax: glob
2 *.egg
2 *.egg
3 *.egg-info
3 *.egg-info
4 *.idea
4 *.idea
5 *.orig
5 *.orig
6 *.pyc
6 *.pyc
7 *.sqlite-journal
7 *.sqlite-journal
8 *.swp
8 *.swp
9 *.tox
9 *.tox
10 *.DS_Store*
10 *.DS_Store*
11 rhodecode/public/js/src/components/**/*.css
11 rhodecode/public/js/src/components/**/*.css
12
12
13 syntax: regexp
13 syntax: regexp
14
14
15 #.filename
15 #.filename
16 ^\.settings$
16 ^\.settings$
17 ^\.project$
17 ^\.project$
18 ^\.pydevproject$
18 ^\.pydevproject$
19 ^\.coverage$
19 ^\.coverage$
20 ^\.cache.*$
20 ^\.cache.*$
21 ^\.rhodecode$
21 ^\.rhodecode$
22
22
23 ^rcextensions
23 ^rcextensions
24 ^.dev
24 ^.dev
25 ^._dev
25 ^._dev
26 ^build/
26 ^build/
27 ^bower_components/
27 ^bower_components/
28 ^coverage\.xml$
28 ^coverage\.xml$
29 ^data$
29 ^data$
30 ^\.eggs/
30 ^\.eggs/
31 ^configs/data$
31 ^configs/data$
32 ^dev.ini$
32 ^dev.ini$
33 ^acceptance_tests/dev.*\.ini$
33 ^acceptance_tests/dev.*\.ini$
34 ^dist/
34 ^dist/
35 ^fabfile.py
35 ^fabfile.py
36 ^htmlcov
36 ^htmlcov
37 ^junit\.xml$
37 ^junit\.xml$
38 ^node_modules/
38 ^node_modules/
39 ^node_binaries/
39 ^pylint.log$
40 ^pylint.log$
40 ^rcextensions/
41 ^rcextensions/
41 ^result$
42 ^result$
42 ^rhodecode/public/css/style.css$
43 ^rhodecode/public/css/style.css$
43 ^rhodecode/public/css/style-polymer.css$
44 ^rhodecode/public/css/style-polymer.css$
44 ^rhodecode/public/js/rhodecode-components.html$
45 ^rhodecode/public/js/rhodecode-components.html$
45 ^rhodecode/public/js/scripts.js$
46 ^rhodecode/public/js/scripts.js$
46 ^rhodecode/public/js/rhodecode-components.js$
47 ^rhodecode/public/js/rhodecode-components.js$
47 ^rhodecode/public/js/src/components/root-styles.gen.html$
48 ^rhodecode/public/js/src/components/root-styles.gen.html$
48 ^rhodecode/public/js/vendors/webcomponentsjs/
49 ^rhodecode/public/js/vendors/webcomponentsjs/
49 ^rhodecode\.db$
50 ^rhodecode\.db$
50 ^rhodecode\.log$
51 ^rhodecode\.log$
51 ^rhodecode_dev\.log$
52 ^rhodecode_dev\.log$
52 ^test\.db$
53 ^test\.db$
53
54
54 # ac-tests
55 # ac-tests
55 ^acceptance_tests/\.cache.*$
56 ^acceptance_tests/\.cache.*$
56 ^acceptance_tests/externals
57 ^acceptance_tests/externals
57 ^acceptance_tests/ghostdriver.log$
58 ^acceptance_tests/ghostdriver.log$
58 ^acceptance_tests/local(_.+)?\.ini$
59 ^acceptance_tests/local(_.+)?\.ini$
59
60
60 # docs
61 # docs
61 ^docs/_build$
62 ^docs/_build$
62 ^docs/result$
63 ^docs/result$
63 ^docs-internal/_build$
64 ^docs-internal/_build$
64
65
65 # Cythonized things
66 # Cythonized things
66 ^rhodecode/.*\.(c|so)$
67 ^rhodecode/.*\.(c|so)$
@@ -1,53 +1,53 b''
1
1
2 .PHONY: clean docs docs-clean docs-cleanup test test-clean test-only test-only-postgres test-only-mysql web-build
2 .PHONY: clean docs docs-clean docs-cleanup test test-clean test-only test-only-postgres test-only-mysql web-build
3
3
4 WEBPACK=./node_modules/webpack/bin/webpack.js
5 GRUNT=grunt
6 NODE_PATH=./node_modules
4 NODE_PATH=./node_modules
5 WEBPACK=./node_binaries/webpack
6 GRUNT=./node_binaries/grunt
7
7
8
8
9 clean:
9 clean:
10 make test-clean
10 make test-clean
11 find . -type f \( -iname '*.c' -o -iname '*.pyc' -o -iname '*.so' \) -exec rm '{}' ';'
11 find . -type f \( -iname '*.c' -o -iname '*.pyc' -o -iname '*.so' \) -exec rm '{}' ';'
12
12
13 test:
13 test:
14 make test-clean
14 make test-clean
15 make test-only
15 make test-only
16
16
17 test-clean:
17 test-clean:
18 rm -rf coverage.xml htmlcov junit.xml pylint.log result
18 rm -rf coverage.xml htmlcov junit.xml pylint.log result
19 find . -type d -name "__pycache__" -prune -exec rm -rf '{}' ';'
19 find . -type d -name "__pycache__" -prune -exec rm -rf '{}' ';'
20
20
21 test-only:
21 test-only:
22 PYTHONHASHSEED=random \
22 PYTHONHASHSEED=random \
23 py.test -x -vv -r xw -p no:sugar --cov=rhodecode \
23 py.test -x -vv -r xw -p no:sugar --cov=rhodecode \
24 --cov-report=term-missing --cov-report=html \
24 --cov-report=term-missing --cov-report=html \
25 rhodecode
25 rhodecode
26
26
27 test-only-mysql:
27 test-only-mysql:
28 PYTHONHASHSEED=random \
28 PYTHONHASHSEED=random \
29 py.test -x -vv -r xw -p no:sugar --cov=rhodecode \
29 py.test -x -vv -r xw -p no:sugar --cov=rhodecode \
30 --cov-report=term-missing --cov-report=html \
30 --cov-report=term-missing --cov-report=html \
31 --ini-config-override='{"app:main": {"sqlalchemy.db1.url": "mysql://root:qweqwe@localhost/rhodecode_test"}}' \
31 --ini-config-override='{"app:main": {"sqlalchemy.db1.url": "mysql://root:qweqwe@localhost/rhodecode_test"}}' \
32 rhodecode
32 rhodecode
33
33
34 test-only-postgres:
34 test-only-postgres:
35 PYTHONHASHSEED=random \
35 PYTHONHASHSEED=random \
36 py.test -x -vv -r xw -p no:sugar --cov=rhodecode \
36 py.test -x -vv -r xw -p no:sugar --cov=rhodecode \
37 --cov-report=term-missing --cov-report=html \
37 --cov-report=term-missing --cov-report=html \
38 --ini-config-override='{"app:main": {"sqlalchemy.db1.url": "postgresql://postgres:qweqwe@localhost/rhodecode_test"}}' \
38 --ini-config-override='{"app:main": {"sqlalchemy.db1.url": "postgresql://postgres:qweqwe@localhost/rhodecode_test"}}' \
39 rhodecode
39 rhodecode
40
40
41
41
42 docs:
42 docs:
43 (cd docs; nix-build default.nix -o result; make clean html)
43 (cd docs; nix-build default.nix -o result; make clean html)
44
44
45 docs-clean:
45 docs-clean:
46 (cd docs; make clean)
46 (cd docs; make clean)
47
47
48 docs-cleanup:
48 docs-cleanup:
49 (cd docs; make cleanup)
49 (cd docs; make cleanup)
50
50
51 web-build:
51 web-build:
52 NODE_PATH=$(NODE_PATH) $(GRUNT)
52 NODE_PATH=$(NODE_PATH) $(GRUNT)
53
53
@@ -1,293 +1,298 b''
1 # Nix environment for the community edition
1 # Nix environment for the community edition
2 #
2 #
3 # This shall be as lean as possible, just producing the enterprise-ce
3 # This shall be as lean as possible, just producing the enterprise-ce
4 # derivation. For advanced tweaks to pimp up the development environment we use
4 # derivation. For advanced tweaks to pimp up the development environment we use
5 # "shell.nix" so that it does not have to clutter this file.
5 # "shell.nix" so that it does not have to clutter this file.
6 #
6 #
7 # Configuration, set values in "~/.nixpkgs/config.nix".
7 # Configuration, set values in "~/.nixpkgs/config.nix".
8 # example
8 # example
9 # {
9 # {
10 # # Thoughts on how to configure the dev environment
10 # # Thoughts on how to configure the dev environment
11 # rc = {
11 # rc = {
12 # codeInternalUrl = "https://usr:token@internal-code.rhodecode.com";
12 # codeInternalUrl = "https://usr:token@internal-code.rhodecode.com";
13 # sources = {
13 # sources = {
14 # rhodecode-vcsserver = "/home/user/work/rhodecode-vcsserver";
14 # rhodecode-vcsserver = "/home/user/work/rhodecode-vcsserver";
15 # rhodecode-enterprise-ce = "/home/user/work/rhodecode-enterprise-ce";
15 # rhodecode-enterprise-ce = "/home/user/work/rhodecode-enterprise-ce";
16 # rhodecode-enterprise-ee = "/home/user/work/rhodecode-enterprise-ee";
16 # rhodecode-enterprise-ee = "/home/user/work/rhodecode-enterprise-ee";
17 # };
17 # };
18 # };
18 # };
19 # }
19 # }
20
20
21 args@
21 args@
22 { pythonPackages ? "python27Packages"
22 { pythonPackages ? "python27Packages"
23 , pythonExternalOverrides ? self: super: {}
23 , pythonExternalOverrides ? self: super: {}
24 , doCheck ? false
24 , doCheck ? false
25 , ...
25 , ...
26 }:
26 }:
27 let pkgs_ = (import <nixpkgs> {}); in
27 let pkgs_ = (import <nixpkgs> {}); in
28
28
29 let
29 let
30 # Use nixpkgs from args or import them. We use this indirect approach
30 # Use nixpkgs from args or import them. We use this indirect approach
31 # through args to be able to use the name `pkgs` for our customized packages.
31 # through args to be able to use the name `pkgs` for our customized packages.
32 # Otherwise we will end up with an infinite recursion.
32 # Otherwise we will end up with an infinite recursion.
33 pkgs = args.pkgs or (import <nixpkgs> {
33 pkgs = args.pkgs or (import <nixpkgs> {
34 overlays = [
34 overlays = [
35 (import ./pkgs/overlays.nix)
35 (import ./pkgs/overlays.nix)
36 ];
36 ];
37 inherit
37 inherit
38 (pkgs_)
38 (pkgs_)
39 system;
39 system;
40 });
40 });
41
41
42 # Works with the new python-packages, still can fallback to the old
42 # Works with the new python-packages, still can fallback to the old
43 # variant.
43 # variant.
44 basePythonPackagesUnfix = basePythonPackages.__unfix__ or (
44 basePythonPackagesUnfix = basePythonPackages.__unfix__ or (
45 self: basePythonPackages.override (a: { inherit self; }));
45 self: basePythonPackages.override (a: { inherit self; }));
46
46
47 # Evaluates to the last segment of a file system path.
47 # Evaluates to the last segment of a file system path.
48 basename = path: with pkgs.lib; last (splitString "/" path);
48 basename = path: with pkgs.lib; last (splitString "/" path);
49
49
50 # source code filter used as arugment to builtins.filterSource.
50 # source code filter used as arugment to builtins.filterSource.
51 src-filter = path: type: with pkgs.lib;
51 src-filter = path: type: with pkgs.lib;
52 let
52 let
53 ext = last (splitString "." path);
53 ext = last (splitString "." path);
54 in
54 in
55 !builtins.elem (basename path) [
55 !builtins.elem (basename path) [
56 ".git" ".hg" "__pycache__" ".eggs" ".idea" ".dev"
56 ".git" ".hg" "__pycache__" ".eggs" ".idea" ".dev"
57 "bower_components" "node_modules"
57 "bower_components" "node_modules" "node_binaries"
58 "build" "data" "result" "tmp"] &&
58 "build" "data" "result" "tmp"] &&
59 !builtins.elem ext ["egg-info" "pyc"] &&
59 !builtins.elem ext ["egg-info" "pyc"] &&
60 # TODO: johbo: This check is wrong, since "path" contains an absolute path,
60 # TODO: johbo: This check is wrong, since "path" contains an absolute path,
61 # it would still be good to restore it since we want to ignore "result-*".
61 # it would still be good to restore it since we want to ignore "result-*".
62 !hasPrefix "result" path;
62 !hasPrefix "result" path;
63
63
64 sources =
64 sources =
65 let
65 let
66 inherit
66 inherit
67 (pkgs.lib)
67 (pkgs.lib)
68 all
68 all
69 isString
69 isString
70 attrValues;
70 attrValues;
71 sourcesConfig = pkgs.config.rc.sources or {};
71 sourcesConfig = pkgs.config.rc.sources or {};
72 in
72 in
73 # Ensure that sources are configured as strings. Using a path
73 # Ensure that sources are configured as strings. Using a path
74 # would result in a copy into the nix store.
74 # would result in a copy into the nix store.
75 assert all isString (attrValues sourcesConfig);
75 assert all isString (attrValues sourcesConfig);
76 sourcesConfig;
76 sourcesConfig;
77
77
78 version = builtins.readFile "${rhodecode-enterprise-ce-src}/rhodecode/VERSION";
78 version = builtins.readFile "${rhodecode-enterprise-ce-src}/rhodecode/VERSION";
79 rhodecode-enterprise-ce-src = builtins.filterSource src-filter ./.;
79 rhodecode-enterprise-ce-src = builtins.filterSource src-filter ./.;
80
80
81 buildBowerComponents = pkgs.buildBowerComponents;
81 buildBowerComponents = pkgs.buildBowerComponents;
82 nodeEnv = import ./pkgs/node-default.nix {
82 nodeEnv = import ./pkgs/node-default.nix {
83 inherit
83 inherit
84 pkgs;
84 pkgs;
85 };
85 };
86 nodeDependencies = nodeEnv.shell.nodeDependencies;
86 nodeDependencies = nodeEnv.shell.nodeDependencies;
87
87
88 bowerComponents = buildBowerComponents {
88 bowerComponents = buildBowerComponents {
89 name = "enterprise-ce-${version}";
89 name = "enterprise-ce-${version}";
90 generated = ./pkgs/bower-packages.nix;
90 generated = ./pkgs/bower-packages.nix;
91 src = rhodecode-enterprise-ce-src;
91 src = rhodecode-enterprise-ce-src;
92 };
92 };
93
93
94 rhodecode-testdata-src = sources.rhodecode-testdata or (
94 rhodecode-testdata-src = sources.rhodecode-testdata or (
95 pkgs.fetchhg {
95 pkgs.fetchhg {
96 url = "https://code.rhodecode.com/upstream/rc_testdata";
96 url = "https://code.rhodecode.com/upstream/rc_testdata";
97 rev = "v0.10.0";
97 rev = "v0.10.0";
98 sha256 = "0zn9swwvx4vgw4qn8q3ri26vvzgrxn15x6xnjrysi1bwmz01qjl0";
98 sha256 = "0zn9swwvx4vgw4qn8q3ri26vvzgrxn15x6xnjrysi1bwmz01qjl0";
99 });
99 });
100
100
101 rhodecode-testdata = import "${rhodecode-testdata-src}/default.nix" {
101 rhodecode-testdata = import "${rhodecode-testdata-src}/default.nix" {
102 inherit
102 inherit
103 doCheck
103 doCheck
104 pkgs
104 pkgs
105 pythonPackages;
105 pythonPackages;
106 };
106 };
107
107
108 pythonLocalOverrides = self: super: {
108 pythonLocalOverrides = self: super: {
109 rhodecode-enterprise-ce =
109 rhodecode-enterprise-ce =
110 let
110 let
111 linkNodeAndBowerPackages = ''
111 linkNodeAndBowerPackages = ''
112 export RHODECODE_CE_PATH=${rhodecode-enterprise-ce-src}
112 export RHODECODE_CE_PATH=${rhodecode-enterprise-ce-src}
113
113
114 echo "[BEGIN]: Link node packages"
114 echo "[BEGIN]: Link node packages and binaries"
115 rm -fr node_modules
116 mkdir node_modules
117 # johbo: Linking individual packages allows us to run "npm install"
115 # johbo: Linking individual packages allows us to run "npm install"
118 # inside of a shell to try things out. Re-entering the shell will
116 # inside of a shell to try things out. Re-entering the shell will
119 # restore a clean environment.
117 # restore a clean environment.
118 rm -fr node_modules
119 mkdir node_modules
120 ln -s ${nodeDependencies}/lib/node_modules/* node_modules/
120 ln -s ${nodeDependencies}/lib/node_modules/* node_modules/
121 echo "[DONE]: Link node packages"
121 export NODE_PATH=./node_modules
122
123 rm -fr node_binaries
124 mkdir node_binaries
125 ln -s ${nodeDependencies}/bin/* node_binaries/
126 echo "[DONE ]: Link node packages and binaries"
122
127
123 echo "[BEGIN]: Link bower packages"
128 echo "[BEGIN]: Link bower packages"
124 rm -fr bower_components
129 rm -fr bower_components
125 mkdir bower_components
130 mkdir bower_components
126 ln -s ${bowerComponents}/bower_components/* bower_components/
131 ln -s ${bowerComponents}/bower_components/* bower_components/
127 echo "[DONE]: Link bower packages"
132 echo "[DONE ]: Link bower packages"
128 '';
133 '';
129
134
130 releaseName = "RhodeCodeEnterpriseCE-${version}";
135 releaseName = "RhodeCodeEnterpriseCE-${version}";
131 in super.rhodecode-enterprise-ce.override (attrs: {
136 in super.rhodecode-enterprise-ce.override (attrs: {
132 inherit
137 inherit
133 doCheck
138 doCheck
134 version;
139 version;
135
140
136 name = "rhodecode-enterprise-ce-${version}";
141 name = "rhodecode-enterprise-ce-${version}";
137 releaseName = releaseName;
142 releaseName = releaseName;
138 src = rhodecode-enterprise-ce-src;
143 src = rhodecode-enterprise-ce-src;
139 dontStrip = true; # prevent strip, we don't need it.
144 dontStrip = true; # prevent strip, we don't need it.
140
145
141 # expose following attributed outside
146 # expose following attributed outside
142 passthru = {
147 passthru = {
143 inherit
148 inherit
144 rhodecode-testdata
149 rhodecode-testdata
145 bowerComponents
150 bowerComponents
146 linkNodeAndBowerPackages
151 linkNodeAndBowerPackages
147 myPythonPackagesUnfix
152 myPythonPackagesUnfix
148 pythonLocalOverrides
153 pythonLocalOverrides
149 pythonCommunityOverrides;
154 pythonCommunityOverrides;
150
155
151 pythonPackages = self;
156 pythonPackages = self;
152 };
157 };
153
158
154 buildInputs =
159 buildInputs =
155 attrs.buildInputs or [] ++ [
160 attrs.buildInputs or [] ++ [
156 rhodecode-testdata
161 rhodecode-testdata
157 pkgs.nodePackages.bower
158 pkgs.nodePackages.grunt-cli
159 ];
162 ];
160
163
161 #NOTE: option to inject additional propagatedBuildInputs
164 #NOTE: option to inject additional propagatedBuildInputs
162 propagatedBuildInputs =
165 propagatedBuildInputs =
163 attrs.propagatedBuildInputs or [] ++ [
166 attrs.propagatedBuildInputs or [] ++ [
164
167
165 ];
168 ];
166
169
167 LC_ALL = "en_US.UTF-8";
170 LC_ALL = "en_US.UTF-8";
168 LOCALE_ARCHIVE =
171 LOCALE_ARCHIVE =
169 if pkgs.stdenv.isLinux
172 if pkgs.stdenv.isLinux
170 then "${pkgs.glibcLocales}/lib/locale/locale-archive"
173 then "${pkgs.glibcLocales}/lib/locale/locale-archive"
171 else "";
174 else "";
172
175
173 # Add bin directory to path so that tests can find 'rhodecode'.
176 # Add bin directory to path so that tests can find 'rhodecode'.
174 preCheck = ''
177 preCheck = ''
175 export PATH="$out/bin:$PATH"
178 export PATH="$out/bin:$PATH"
176 '';
179 '';
177
180
178 # custom check phase for testing
181 # custom check phase for testing
179 checkPhase = ''
182 checkPhase = ''
180 runHook preCheck
183 runHook preCheck
181 PYTHONHASHSEED=random py.test -vv -p no:sugar -r xw --cov-config=.coveragerc --cov=rhodecode --cov-report=term-missing rhodecode
184 PYTHONHASHSEED=random py.test -vv -p no:sugar -r xw --cov-config=.coveragerc --cov=rhodecode --cov-report=term-missing rhodecode
182 runHook postCheck
185 runHook postCheck
183 '';
186 '';
184
187
185 postCheck = ''
188 postCheck = ''
186 echo "Cleanup of rhodecode/tests"
189 echo "Cleanup of rhodecode/tests"
187 rm -rf $out/lib/${self.python.libPrefix}/site-packages/rhodecode/tests
190 rm -rf $out/lib/${self.python.libPrefix}/site-packages/rhodecode/tests
188 '';
191 '';
189
192
190 preBuild = ''
193 preBuild = ''
191 echo "Building frontend assets"
194 echo "[BEGIN]: Building frontend assets"
192 ${linkNodeAndBowerPackages}
195 ${linkNodeAndBowerPackages}
193 grunt
196 make web-build
194 rm -fr node_modules
197 rm -fr node_modules
198 rm -fr node_binaries
199 echo "[DONE ]: Building frontend assets"
195 '';
200 '';
196
201
197 postInstall = ''
202 postInstall = ''
198 # check required files
203 # check required files
199 if [ ! -f rhodecode/public/js/scripts.js ]; then
204 if [ ! -f rhodecode/public/js/scripts.js ]; then
200 echo "Missing scripts.js"
205 echo "Missing scripts.js"
201 exit 1
206 exit 1
202 fi
207 fi
203 if [ ! -f rhodecode/public/css/style.css ]; then
208 if [ ! -f rhodecode/public/css/style.css ]; then
204 echo "Missing style.css"
209 echo "Missing style.css"
205 exit 1
210 exit 1
206 fi
211 fi
207
212
208 echo "Writing enterprise-ce meta information for rccontrol to nix-support/rccontrol"
213 echo "Writing enterprise-ce meta information for rccontrol to nix-support/rccontrol"
209 mkdir -p $out/nix-support/rccontrol
214 mkdir -p $out/nix-support/rccontrol
210 cp -v rhodecode/VERSION $out/nix-support/rccontrol/version
215 cp -v rhodecode/VERSION $out/nix-support/rccontrol/version
211 echo "[DONE]: enterprise-ce meta information for rccontrol written"
216 echo "[DONE ]: enterprise-ce meta information for rccontrol written"
212
217
213 mkdir -p $out/etc
218 mkdir -p $out/etc
214 cp configs/production.ini $out/etc
219 cp configs/production.ini $out/etc
215 echo "[DONE]: saved enterprise-ce production.ini into $out/etc"
220 echo "[DONE ]: saved enterprise-ce production.ini into $out/etc"
216
221
217 cp -r rhodecode/config/rcextensions $out/etc/rcextensions.tmpl
222 cp -r rhodecode/config/rcextensions $out/etc/rcextensions.tmpl
218 echo "[DONE]: saved enterprise-ce rcextensions into $out/etc/rcextensions.tmpl"
223 echo "[DONE ]: saved enterprise-ce rcextensions into $out/etc/rcextensions.tmpl"
219
224
220 # python based programs need to be wrapped
225 # python based programs need to be wrapped
221 mkdir -p $out/bin
226 mkdir -p $out/bin
222
227
223 # required binaries from dependencies
228 # required binaries from dependencies
224 ln -s ${self.supervisor}/bin/supervisorctl $out/bin/
229 ln -s ${self.supervisor}/bin/supervisorctl $out/bin/
225 ln -s ${self.supervisor}/bin/supervisord $out/bin/
230 ln -s ${self.supervisor}/bin/supervisord $out/bin/
226 ln -s ${self.pastescript}/bin/paster $out/bin/
231 ln -s ${self.pastescript}/bin/paster $out/bin/
227 ln -s ${self.channelstream}/bin/channelstream $out/bin/
232 ln -s ${self.channelstream}/bin/channelstream $out/bin/
228 ln -s ${self.celery}/bin/celery $out/bin/
233 ln -s ${self.celery}/bin/celery $out/bin/
229 ln -s ${self.gunicorn}/bin/gunicorn $out/bin/
234 ln -s ${self.gunicorn}/bin/gunicorn $out/bin/
230 ln -s ${self.pyramid}/bin/prequest $out/bin/
235 ln -s ${self.pyramid}/bin/prequest $out/bin/
231 ln -s ${self.pyramid}/bin/pserve $out/bin/
236 ln -s ${self.pyramid}/bin/pserve $out/bin/
232
237
233 echo "[DONE]: created symlinks into $out/bin"
238 echo "[DONE ]: created symlinks into $out/bin"
234 DEPS="$out/bin/supervisorctl \
239 DEPS="$out/bin/supervisorctl \
235 $out/bin/supervisord \
240 $out/bin/supervisord \
236 $out/bin/paster \
241 $out/bin/paster \
237 $out/bin/channelstream \
242 $out/bin/channelstream \
238 $out/bin/celery \
243 $out/bin/celery \
239 $out/bin/gunicorn \
244 $out/bin/gunicorn \
240 $out/bin/prequest \
245 $out/bin/prequest \
241 $out/bin/pserve"
246 $out/bin/pserve"
242
247
243 # wrap only dependency scripts, they require to have full PYTHONPATH set
248 # wrap only dependency scripts, they require to have full PYTHONPATH set
244 # to be able to import all packages
249 # to be able to import all packages
245 for file in $DEPS;
250 for file in $DEPS;
246 do
251 do
247 wrapProgram $file \
252 wrapProgram $file \
248 --prefix PATH : $PATH \
253 --prefix PATH : $PATH \
249 --prefix PYTHONPATH : $PYTHONPATH \
254 --prefix PYTHONPATH : $PYTHONPATH \
250 --set PYTHONHASHSEED random
255 --set PYTHONHASHSEED random
251 done
256 done
252
257
253 echo "[DONE]: enterprise-ce binary wrapping"
258 echo "[DONE ]: enterprise-ce binary wrapping"
254
259
255 # rhodecode-tools don't need wrapping
260 # rhodecode-tools don't need wrapping
256 ln -s ${self.rhodecode-tools}/bin/rhodecode-* $out/bin/
261 ln -s ${self.rhodecode-tools}/bin/rhodecode-* $out/bin/
257
262
258 '';
263 '';
259 });
264 });
260
265
261 };
266 };
262
267
263 basePythonPackages = with builtins;
268 basePythonPackages = with builtins;
264 if isAttrs pythonPackages then
269 if isAttrs pythonPackages then
265 pythonPackages
270 pythonPackages
266 else
271 else
267 getAttr pythonPackages pkgs;
272 getAttr pythonPackages pkgs;
268
273
269 pythonGeneratedPackages = import ./pkgs/python-packages.nix {
274 pythonGeneratedPackages = import ./pkgs/python-packages.nix {
270 inherit
275 inherit
271 pkgs;
276 pkgs;
272 inherit
277 inherit
273 (pkgs)
278 (pkgs)
274 fetchurl
279 fetchurl
275 fetchgit
280 fetchgit
276 fetchhg;
281 fetchhg;
277 };
282 };
278
283
279 pythonCommunityOverrides = import ./pkgs/python-packages-overrides.nix {
284 pythonCommunityOverrides = import ./pkgs/python-packages-overrides.nix {
280 inherit pkgs basePythonPackages;
285 inherit pkgs basePythonPackages;
281 };
286 };
282
287
283 # Apply all overrides and fix the final package set
288 # Apply all overrides and fix the final package set
284 myPythonPackagesUnfix = with pkgs.lib;
289 myPythonPackagesUnfix = with pkgs.lib;
285 (extends pythonExternalOverrides
290 (extends pythonExternalOverrides
286 (extends pythonLocalOverrides
291 (extends pythonLocalOverrides
287 (extends pythonCommunityOverrides
292 (extends pythonCommunityOverrides
288 (extends pythonGeneratedPackages
293 (extends pythonGeneratedPackages
289 basePythonPackagesUnfix))));
294 basePythonPackagesUnfix))));
290
295
291 myPythonPackages = (pkgs.lib.fix myPythonPackagesUnfix);
296 myPythonPackages = (pkgs.lib.fix myPythonPackagesUnfix);
292
297
293 in myPythonPackages.rhodecode-enterprise-ce
298 in myPythonPackages.rhodecode-enterprise-ce
@@ -1,33 +1,36 b''
1 {
1 {
2 "name": "rhodecode-enterprise",
2 "name": "rhodecode-enterprise",
3 "version": "1.0.0",
3 "version": "1.0.0",
4 "private": true,
4 "private": true,
5 "description" : "RhodeCode JS packaged",
5 "description" : "RhodeCode JS packaged",
6 "license": "SEE LICENSE IN LICENSE.txt",
6 "license": "SEE LICENSE IN LICENSE.txt",
7 "repository" : {
7 "repository" : {
8 "type" : "hg",
8 "type" : "hg",
9 "url" : "https://code.rhodecode.com/rhodecode-enterprise-ce"
9 "url" : "https://code.rhodecode.com/rhodecode-enterprise-ce"
10 },
10 },
11 "devDependencies": {
11 "devDependencies": {
12 "appenlight-client": "git+https://git@github.com/AppEnlight/appenlight-client-js.git#0.5.1",
13 "bower": "^1.8.4",
14 "clipboard": "^2.0.1",
15 "exports-loader": "^0.6.4",
16 "favico.js": "^0.3.10",
12 "grunt": "^0.4.5",
17 "grunt": "^0.4.5",
18 "grunt-cli": "^1.3.1",
19 "grunt-contrib-concat": "^0.5.1",
13 "grunt-contrib-copy": "^1.0.0",
20 "grunt-contrib-copy": "^1.0.0",
14 "grunt-contrib-concat": "^0.5.1",
15 "grunt-contrib-jshint": "^0.12.0",
21 "grunt-contrib-jshint": "^0.12.0",
16 "grunt-contrib-less": "^1.1.0",
22 "grunt-contrib-less": "^1.1.0",
17 "grunt-contrib-watch": "^0.6.1",
23 "grunt-contrib-watch": "^0.6.1",
18 "vulcanize": "^1.16.0",
19 "grunt-vulcanize": "^1.0.0",
24 "grunt-vulcanize": "^1.0.0",
20 "node2nix": "^1.0.0",
25 "jquery": "1.11.3",
21 "jshint": "^2.9.1-rc3",
26 "jshint": "^2.9.1-rc3",
22 "bower": "^1.8.4",
23 "jquery": "1.11.3",
24 "favico.js": "^0.3.10",
25 "clipboard": "^2.0.1",
26 "qrious": "^4.0.2",
27 "moment": "^2.18.1",
27 "moment": "^2.18.1",
28 "mousetrap": "^1.6.1",
28 "mousetrap": "^1.6.1",
29 "qrious": "^4.0.2",
29 "sticky-sidebar": "3.3.1",
30 "sticky-sidebar": "3.3.1",
31 "vulcanize": "^1.16.0",
30 "waypoints": "4.0.1",
32 "waypoints": "4.0.1",
31 "appenlight-client": "git+https://git@github.com/AppEnlight/appenlight-client-js.git#0.5.1"
33 "webpack": "4.23.1",
34 "webpack-cli": "3.1.2"
32 }
35 }
33 }
36 }
@@ -1,65 +1,65 b''
1
1
2 ==============================
2 ==============================
3 Generate the Nix expressions
3 Generate the Nix expressions
4 ==============================
4 ==============================
5
5
6 Details can be found in the repository of `RhodeCode Enterprise CE`_ inside of
6 Details can be found in the repository of `RhodeCode Enterprise CE`_ inside of
7 the file `docs/contributing/dependencies.rst`.
7 the file `docs/contributing/dependencies.rst`.
8
8
9 Start the environment as follows:
9 Start the environment as follows:
10
10
11 .. code:: shell
11 .. code:: shell
12
12
13 nix-shell pkgs/shell-generate.nix
13 nix-shell pkgs/shell-generate.nix
14
14
15
15
16
16
17 Python dependencies
17 Python dependencies
18 ===================
18 ===================
19
19
20 .. code:: shell
20 .. code:: shell
21
21
22 pip2nix generate --licenses
22 pip2nix generate --licenses
23 # or
23 # or
24 nix-shell pkgs/shell-generate.nix --command "pip2nix generate --licenses"
24 nix-shell pkgs/shell-generate.nix --command "pip2nix generate --licenses"
25
25
26
26
27 NodeJS dependencies
27 NodeJS dependencies
28 ===================
28 ===================
29
29
30 Generate node-packages.nix file with all dependencies from NPM and package.json file
30 Generate node-packages.nix file with all dependencies from NPM and package.json file
31 This should be run before entering nix-shell.
31 This should be run before entering nix-shell.
32
32
33 The sed at the end fixex a bug with http rewrite of re-generated packages
34
33 .. code:: shell
35 .. code:: shell
34
36
35 rm -rf node_modules
37 rm -rf node_modules &&
36 nix-shell pkgs/shell-generate.nix --command "
38 nix-shell pkgs/shell-generate.nix --command "
37 node2nix --input package.json \
39 node2nix --input package.json \
38 -o pkgs/node-packages.nix \
40 -o pkgs/node-packages.nix \
39 -e pkgs/node-env.nix \
41 -e pkgs/node-env.nix \
40 -c pkgs/node-default.nix \
42 -c pkgs/node-default.nix \
41 -d --flatten --nodejs-8 "
43 -d --flatten --nodejs-8 " &&
42
43 # fix bug with http rewrite of re-generated packages
44 sed -i -e 's/http:\/\//https:\/\//g' pkgs/node-packages.nix
44 sed -i -e 's/http:\/\//https:\/\//g' pkgs/node-packages.nix
45
45
46
46
47 Bower dependencies
47 Bower dependencies
48 ==================
48 ==================
49
49
50 .. code:: shell
50 .. code:: shell
51
51
52 nix-shell pkgs/shell-generate.nix --command "bower2nix bower.json pkgs/bower-packages.nix"
52 nix-shell pkgs/shell-generate.nix --command "bower2nix bower.json pkgs/bower-packages.nix"
53
53
54
54
55 Generate license data
55 Generate license data
56 =====================
56 =====================
57
57
58 .. code:: shell
58 .. code:: shell
59
59
60 nix-build pkgs/license-generate.nix -o result-license && cat result-license/licenses.json | python -m json.tool > rhodecode/config/licenses.json
60 nix-build pkgs/license-generate.nix -o result-license && cat result-license/licenses.json | python -m json.tool > rhodecode/config/licenses.json
61
61
62
62
63 .. Links
63 .. Links
64
64
65 .. _RhodeCode Enterprise CE: https://code.rhodecode.com/rhodecode-enterprise-ce
65 .. _RhodeCode Enterprise CE: https://code.rhodecode.com/rhodecode-enterprise-ce
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
General Comments 0
You need to be logged in to leave comments. Login now