##// END OF EJS Templates
packaging: switched to nix 20.03 packages and latest pip2nix code...
marcink -
r4756:2a5b3f8a python3
parent child Browse files
Show More

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

@@ -1,52 +1,53 b''
1 # top level files
1 # top level files
2
2
3 include MANIFEST.in
3 include MANIFEST.in
4 include README.rst
4 include README.rst
5 include CHANGES.rst
5 include CHANGES.rst
6 include LICENSE.txt
6 include LICENSE.txt
7
7
8 include rhodecode/VERSION
8 include rhodecode/VERSION
9
9
10 # docs
10 # docs
11 recursive-include docs *
11 recursive-include docs *
12
12
13 # all config files
13 # all config files
14 recursive-include configs *
14 recursive-include configs *
15
15
16 # translations
16 # translations
17 recursive-include rhodecode/i18n *
17 recursive-include rhodecode/i18n *
18
18
19 # non-python core stuff
19 # non-python core stuff
20 recursive-include rhodecode *.cfg
20 recursive-include rhodecode *.cfg
21 recursive-include rhodecode *.json
21 recursive-include rhodecode *.json
22 recursive-include rhodecode *.ini_tmpl
22 recursive-include rhodecode *.ini_tmpl
23 recursive-include rhodecode *.sh
23 recursive-include rhodecode *.sh
24 recursive-include rhodecode *.mako
24 recursive-include rhodecode *.mako
25
25
26 # 502 page
26 # 502 page
27 include rhodecode/public/502.html
27 include rhodecode/public/502.html
28
28
29 # robots
29 # robots
30 include rhodecode/public/robots.txt
30 include rhodecode/public/robots.txt
31
31
32 # images, css
32 # images, css
33 include rhodecode/public/css/*.css
33 include rhodecode/public/css/*.css
34 include rhodecode/public/images/*.*
34 include rhodecode/public/images/*.*
35 include rhodecode/public/images/ee_features/*.*
35 include rhodecode/public/images/ee_features/*.*
36
36
37 # sound files
37 # sound files
38 include rhodecode/public/sounds/*.mp3
38 include rhodecode/public/sounds/*.mp3
39 include rhodecode/public/sounds/*.wav
39 include rhodecode/public/sounds/*.wav
40
40
41 # fonts
41 # fonts
42 recursive-include rhodecode/public/fonts/RCIcons *
42 recursive-include rhodecode/public/fonts/RCIcons *
43
43
44 # js
44 # js
45 recursive-include rhodecode/public/js *
45 recursive-include rhodecode/public/js *
46
46
47 # templates
47 # templates
48 recursive-include rhodecode/templates *
48 recursive-include rhodecode/templates *
49
49
50 # skip any tests files
50 # skip any tests files
51 recursive-exclude result *
51 recursive-exclude rhodecode/tests *
52 recursive-exclude rhodecode/tests *
52
53
@@ -1,69 +1,69 b''
1
1
2 .PHONY: clean docs docs-clean docs-cleanup test test-clean test-only test-only-postgres test-only-mysql web-build generate-pkgs pip-packages
2 .PHONY: clean docs docs-clean docs-cleanup test test-clean test-only test-only-postgres test-only-mysql web-build generate-pkgs pip-packages
3
3
4 NODE_PATH=./node_modules
4 NODE_PATH=./node_modules
5 WEBPACK=./node_binaries/webpack
5 WEBPACK=./node_binaries/webpack
6 GRUNT=./node_binaries/grunt
6 GRUNT=./node_binaries/grunt
7 # set by: PATH_TO_OUTDATED_PACKAGES=/some/path/outdated_packages.py
7 # set by: PATH_TO_OUTDATED_PACKAGES=/some/path/outdated_packages.py
8 OUTDATED_PACKAGES = ${PATH_TO_OUTDATED_PACKAGES}
8 OUTDATED_PACKAGES = ${PATH_TO_OUTDATED_PACKAGES}
9
9
10 clean:
10 clean:
11 make test-clean
11 make test-clean
12 find . -type f \( -iname '*.c' -o -iname '*.pyc' -o -iname '*.so' -o -iname '*.orig' \) -exec rm '{}' ';'
12 find . -type f \( -iname '*.c' -o -iname '*.pyc' -o -iname '*.so' -o -iname '*.orig' \) -exec rm '{}' ';'
13
13
14 test:
14 test:
15 make test-clean
15 make test-clean
16 make test-only
16 make test-only
17
17
18 test-clean:
18 test-clean:
19 rm -rf coverage.xml htmlcov junit.xml pylint.log result
19 rm -rf coverage.xml htmlcov junit.xml pylint.log result
20 find . -type d -name "__pycache__" -prune -exec rm -rf '{}' ';'
20 find . -type d -name "__pycache__" -prune -exec rm -rf '{}' ';'
21 find . -type f \( -iname '.coverage.*' \) -exec rm '{}' ';'
21 find . -type f \( -iname '.coverage.*' \) -exec rm '{}' ';'
22
22
23 test-only:
23 test-only:
24 PYTHONHASHSEED=random \
24 PYTHONHASHSEED=random \
25 py.test -x -vv -r xw -p no:sugar --cov=rhodecode \
25 py.test -x -vv -r xw -p no:sugar --cov=rhodecode \
26 --cov-report=term-missing --cov-report=html \
26 --cov-report=term-missing --cov-report=html \
27 rhodecode
27 rhodecode
28
28
29 test-only-mysql:
29 test-only-mysql:
30 PYTHONHASHSEED=random \
30 PYTHONHASHSEED=random \
31 py.test -x -vv -r xw -p no:sugar --cov=rhodecode \
31 py.test -x -vv -r xw -p no:sugar --cov=rhodecode \
32 --cov-report=term-missing --cov-report=html \
32 --cov-report=term-missing --cov-report=html \
33 --ini-config-override='{"app:main": {"sqlalchemy.db1.url": "mysql://root:qweqwe@localhost/rhodecode_test?charset=utf8"}}' \
33 --ini-config-override='{"app:main": {"sqlalchemy.db1.url": "mysql://root:qweqwe@localhost/rhodecode_test?charset=utf8"}}' \
34 rhodecode
34 rhodecode
35
35
36 test-only-postgres:
36 test-only-postgres:
37 PYTHONHASHSEED=random \
37 PYTHONHASHSEED=random \
38 py.test -x -vv -r xw -p no:sugar --cov=rhodecode \
38 py.test -x -vv -r xw -p no:sugar --cov=rhodecode \
39 --cov-report=term-missing --cov-report=html \
39 --cov-report=term-missing --cov-report=html \
40 --ini-config-override='{"app:main": {"sqlalchemy.db1.url": "postgresql://postgres:qweqwe@localhost/rhodecode_test"}}' \
40 --ini-config-override='{"app:main": {"sqlalchemy.db1.url": "postgresql://postgres:qweqwe@localhost/rhodecode_test"}}' \
41 rhodecode
41 rhodecode
42
42
43
43
44 docs:
44 docs:
45 (cd docs; nix-build default.nix -o result; make clean html)
45 (cd docs; nix-build default.nix -o result; make clean html)
46
46
47 docs-clean:
47 docs-clean:
48 (cd docs; make clean)
48 (cd docs; make clean)
49
49
50 docs-cleanup:
50 docs-cleanup:
51 (cd docs; make cleanup)
51 (cd docs; make cleanup)
52
52
53 web-build:
53 web-build:
54 NODE_PATH=$(NODE_PATH) $(GRUNT)
54 NODE_PATH=$(NODE_PATH) $(GRUNT)
55
55
56 generate-pkgs:
56 generate-pkgs:
57 nix-shell pkgs/shell-generate.nix --command "pip2nix generate --licenses"
57 nix-shell pkgs/shell-generate.nix --command "pip2nix generate --licenses --no-binary :all:"
58
58
59 pip-packages:
59 pip-packages:
60 python ${OUTDATED_PACKAGES}
60 python ${OUTDATED_PACKAGES}
61
61
62 generate-js-pkgs:
62 generate-js-pkgs:
63 rm -rf node_modules && \
63 rm -rf node_modules && \
64 nix-shell pkgs/shell-generate.nix --command "node2nix --input package.json -o pkgs/node-packages.nix -e pkgs/node-env.nix -c pkgs/node-default.nix -d --flatten --nodejs-8" && \
64 nix-shell pkgs/shell-generate.nix --command "node2nix --input package.json -o pkgs/node-packages.nix -e pkgs/node-env.nix -c pkgs/node-default.nix -d --flatten --nodejs-8" && \
65 sed -i -e 's/http:\/\//https:\/\//g' pkgs/node-packages.nix
65 sed -i -e 's/http:\/\//https:\/\//g' pkgs/node-packages.nix
66
66
67 generate-license-meta:
67 generate-license-meta:
68 nix-build pkgs/license-generate.nix -o result-license && \
68 nix-build pkgs/license-generate.nix -o result-license && \
69 cat result-license/licenses.json | python -m json.tool > rhodecode/config/licenses.json No newline at end of file
69 cat result-license/licenses.json | python -m json.tool > rhodecode/config/licenses.json
@@ -1,296 +1,292 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@code.rhodecode.com/internal";
12 # codeInternalUrl = "https://usr:token@code.rhodecode.com/internal";
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 { system ? builtins.currentSystem
22 { system ? builtins.currentSystem
23 , pythonPackages ? "python27Packages"
23 , pythonPackages ? "python27Packages"
24 , pythonExternalOverrides ? self: super: {}
24 , pythonExternalOverrides ? self: super: {}
25 , doCheck ? false
25 , doCheck ? false
26 , ...
26 , ...
27 }:
27 }:
28
28
29 let
29 let
30 pkgs_ = args.pkgs or (import <nixpkgs> { inherit system; });
30 pkgs_ = args.pkgs or (import <nixpkgs> { inherit system; });
31 in
31 in
32
32
33 let
33 let
34 pkgs = import <nixpkgs> {
34 pkgs = import <nixpkgs> {
35 overlays = [
35 overlays = [
36 (import ./pkgs/overlays.nix)
36 (import ./pkgs/overlays.nix)
37 ];
37 ];
38 inherit
38 inherit
39 (pkgs_)
39 (pkgs_)
40 system;
40 system;
41 };
41 };
42
42
43 # Works with the new python-packages, still can fallback to the old
43 # Works with the new python-packages, still can fallback to the old
44 # variant.
44 # variant.
45 basePythonPackagesUnfix = basePythonPackages.__unfix__ or (
45 basePythonPackagesUnfix = basePythonPackages.__unfix__ or (
46 self: basePythonPackages.override (a: { inherit self; }));
46 self: basePythonPackages.override (a: { inherit self; }));
47
47
48 # Evaluates to the last segment of a file system path.
48 # Evaluates to the last segment of a file system path.
49 basename = path: with pkgs.lib; last (splitString "/" path);
49 basename = path: with pkgs.lib; last (splitString "/" path);
50 startsWith = prefix: full: let
51 actualPrefix = builtins.substring 0 (builtins.stringLength prefix) full;
52 in actualPrefix == prefix;
50
53
51 # source code filter used as arugment to builtins.filterSource.
54 # source code filter used as arugment to builtins.filterSource.
52 src-filter = path: type: with pkgs.lib;
55 src-filter = path: type: with pkgs.lib;
53 let
56 let
54 ext = last (splitString "." path);
57 ext = last (splitString "." path);
58 parts = last (splitString "/" path);
55 in
59 in
56 !builtins.elem (basename path) [
60 !builtins.elem (basename path) [
57 ".git" ".hg" "__pycache__" ".eggs" ".idea" ".dev"
61 ".git" ".hg" "__pycache__" ".eggs" ".idea" ".dev"
58 "node_modules" "node_binaries"
62 "node_modules" "node_binaries"
59 "build" "data" "result" "tmp"] &&
63 "build" "data" "result" "tmp"] &&
60 !builtins.elem ext ["egg-info" "pyc"] &&
64 !builtins.elem ext ["egg-info" "pyc"] &&
61 # TODO: johbo: This check is wrong, since "path" contains an absolute path,
65 !startsWith "result" (basename path);
62 # it would still be good to restore it since we want to ignore "result-*".
63 !hasPrefix "result" path;
64
66
65 sources =
67 sources =
66 let
68 let
67 inherit
69 inherit
68 (pkgs.lib)
70 (pkgs.lib)
69 all
71 all
70 isString
72 isString
71 attrValues;
73 attrValues;
74
72 sourcesConfig = pkgs.config.rc.sources or {};
75 sourcesConfig = pkgs.config.rc.sources or {};
73 in
76 in
74 # Ensure that sources are configured as strings. Using a path
77 # Ensure that sources are configured as strings. Using a path
75 # would result in a copy into the nix store.
78 # would result in a copy into the nix store.
76 assert all isString (attrValues sourcesConfig);
79 assert all isString (attrValues sourcesConfig);
77 sourcesConfig;
80 sourcesConfig;
78
81
79 version = builtins.readFile "${rhodecode-enterprise-ce-src}/rhodecode/VERSION";
82 version = builtins.readFile "${rhodecode-enterprise-ce-src}/rhodecode/VERSION";
80 rhodecode-enterprise-ce-src = builtins.filterSource src-filter ./.;
83 rhodecode-enterprise-ce-src = builtins.filterSource src-filter ./.;
81
84
82 nodeEnv = import ./pkgs/node-default.nix {
85 nodeEnv = import ./pkgs/node-default.nix {
83 inherit
86 inherit
84 pkgs
87 pkgs
85 system;
88 system;
86 };
89 };
87 nodeDependencies = nodeEnv.shell.nodeDependencies;
90 nodeDependencies = nodeEnv.shell.nodeDependencies;
88
91
89 rhodecode-testdata-src = sources.rhodecode-testdata or (
92 rhodecode-testdata-src = sources.rhodecode-testdata or (
90 pkgs.fetchhg {
93 pkgs.fetchhg {
91 url = "https://code.rhodecode.com/upstream/rc_testdata";
94 url = "https://code.rhodecode.com/upstream/rc_testdata";
92 rev = "v0.10.0";
95 rev = "v0.10.0";
93 sha256 = "0zn9swwvx4vgw4qn8q3ri26vvzgrxn15x6xnjrysi1bwmz01qjl0";
96 sha256 = "0zn9swwvx4vgw4qn8q3ri26vvzgrxn15x6xnjrysi1bwmz01qjl0";
94 });
97 });
95
98
96 rhodecode-testdata = import "${rhodecode-testdata-src}/default.nix" {
99 rhodecode-testdata = import "${rhodecode-testdata-src}/default.nix" {
97 inherit
100 inherit
98 doCheck
101 doCheck
99 pkgs
102 pkgs
100 pythonPackages;
103 pythonPackages;
101 };
104 };
102
105
103 pythonLocalOverrides = self: super: {
106 pythonLocalOverrides = self: super: {
104 rhodecode-enterprise-ce =
107 rhodecode-enterprise-ce =
105 let
108 let
106 linkNodePackages = ''
109 linkNodePackages = ''
107 export RHODECODE_CE_PATH=${rhodecode-enterprise-ce-src}
110 export RHODECODE_CE_PATH=${rhodecode-enterprise-ce-src}
108
111
109 echo "[BEGIN]: Link node packages and binaries"
112 echo "[BEGIN]: Link node packages and binaries"
110 # johbo: Linking individual packages allows us to run "npm install"
113 # johbo: Linking individual packages allows us to run "npm install"
111 # inside of a shell to try things out. Re-entering the shell will
114 # inside of a shell to try things out. Re-entering the shell will
112 # restore a clean environment.
115 # restore a clean environment.
113 rm -fr node_modules
116 rm -fr node_modules
114 mkdir node_modules
117 mkdir node_modules
115 ln -s ${nodeDependencies}/lib/node_modules/* node_modules/
118 ln -s ${nodeDependencies}/lib/node_modules/* node_modules/
116 export NODE_PATH=./node_modules
119 export NODE_PATH=./node_modules
117
120
118 rm -fr node_binaries
121 rm -fr node_binaries
119 mkdir node_binaries
122 mkdir node_binaries
120 ln -s ${nodeDependencies}/bin/* node_binaries/
123 ln -s ${nodeDependencies}/bin/* node_binaries/
121 echo "[DONE ]: Link node packages and binaries"
124 echo "[DONE ]: Link node packages and binaries"
122 '';
125 '';
123
126
124 releaseName = "RhodeCodeEnterpriseCE-${version}";
127 releaseName = "RhodeCodeEnterpriseCE-${version}";
125 in super.rhodecode-enterprise-ce.override (attrs: {
128 in super.rhodecode-enterprise-ce.override (attrs: {
126 inherit
129 inherit
127 doCheck
130 doCheck
128 version;
131 version;
129
132
130 name = "rhodecode-enterprise-ce-${version}";
133 name = "rhodecode-enterprise-ce-${version}";
131 releaseName = releaseName;
134 releaseName = releaseName;
132 src = rhodecode-enterprise-ce-src;
135 src = rhodecode-enterprise-ce-src;
133 dontStrip = true; # prevent strip, we don't need it.
136 dontStrip = true; # prevent strip, we don't need it.
134
137
135 # expose following attributed outside
138 # expose following attributed outside
136 passthru = {
139 passthru = {
137 inherit
140 inherit
138 rhodecode-testdata
141 rhodecode-testdata
139 linkNodePackages
142 linkNodePackages
140 myPythonPackagesUnfix
143 myPythonPackagesUnfix
141 pythonLocalOverrides
144 pythonLocalOverrides
142 pythonCommunityOverrides;
145 pythonCommunityOverrides;
143
146
144 pythonPackages = self;
147 pythonPackages = self;
145 };
148 };
146
149
147 buildInputs =
150 buildInputs =
148 attrs.buildInputs or [] ++ [
151 attrs.buildInputs or [] ++ [
149 rhodecode-testdata
152 rhodecode-testdata
150 ];
153 ];
151
154
152 #NOTE: option to inject additional propagatedBuildInputs
155 #NOTE: option to inject additional propagatedBuildInputs
153 propagatedBuildInputs =
156 propagatedBuildInputs =
154 attrs.propagatedBuildInputs or [] ++ [
157 attrs.propagatedBuildInputs or [] ++ [
155
158
156 ];
159 ];
160
161 preBuild = ''
162 export NIX_PATH=nixpkgs=${pkgs.path}
163 export SSL_CERT_FILE=${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt
157
164
158 LC_ALL = "en_US.UTF-8";
165 echo "[BEGIN]: Building frontend assets"
159 LOCALE_ARCHIVE =
166 ${linkNodePackages}
160 if pkgs.stdenv.isLinux
167 make web-build
161 then "${pkgs.glibcLocales}/lib/locale/locale-archive"
168 rm -fr node_modules
162 else "";
169 rm -fr node_binaries
170 echo "[DONE ]: Building frontend assets"
171 '';
163
172
164 # Add bin directory to path so that tests can find 'rhodecode'.
173 # Add bin directory to path so that tests can find 'rhodecode'.
165 preCheck = ''
174 preCheck = ''
175 echo "Expanding PATH with $out/bin directory"
166 export PATH="$out/bin:$PATH"
176 export PATH="$out/bin:$PATH"
167 '';
177 '';
168
178
169 # custom check phase for testing
179 # custom check phase for testing
170 checkPhase = ''
180 checkPhase = ''
171 runHook preCheck
181 runHook preCheck
172 PYTHONHASHSEED=random py.test -vv -p no:sugar -r xw --cov-config=.coveragerc --cov=rhodecode --cov-report=term-missing rhodecode
182 PYTHONHASHSEED=random py.test -vv -p no:sugar -r xw --cov-config=.coveragerc --cov=rhodecode --cov-report=term-missing rhodecode
173 runHook postCheck
183 runHook postCheck
174 '';
184 '';
175
185
176 postCheck = ''
186 postCheck = ''
177 echo "Cleanup of rhodecode/tests"
187 echo "Cleanup of rhodecode/tests"
178 rm -rf $out/lib/${self.python.libPrefix}/site-packages/rhodecode/tests
188 rm -rf $out/lib/${self.python.libPrefix}/site-packages/rhodecode/tests
179 '';
189 '';
180
190
181 preBuild = ''
182 echo "[BEGIN]: Building frontend assets"
183 ${linkNodePackages}
184 make web-build
185 rm -fr node_modules
186 rm -fr node_binaries
187 echo "[DONE ]: Building frontend assets"
188 '';
189
190 postInstall = ''
191 postInstall = ''
191 # check required files
192 # check required files
192 STATIC_CHECK="/robots.txt /502.html
193 STATIC_CHECK="/robots.txt /502.html
193 /js/scripts.min.js /js/rhodecode-components.js
194 /js/scripts.min.js /js/rhodecode-components.js
194 /css/style.css /css/style-polymer.css /css/style-ipython.css"
195 /css/style.css /css/style-polymer.css /css/style-ipython.css"
195
196
196 for file in $STATIC_CHECK;
197 for file in $STATIC_CHECK;
197 do
198 do
198 if [ ! -f rhodecode/public/$file ]; then
199 if [ ! -f rhodecode/public/$file ]; then
199 echo "Missing $file"
200 echo "Missing $file"
200 exit 1
201 exit 1
201 fi
202 fi
202 done
203 done
203
204
204 echo "Writing enterprise-ce meta information for rccontrol to nix-support/rccontrol"
205 echo "Writing enterprise-ce meta information for rccontrol to nix-support/rccontrol"
205 mkdir -p $out/nix-support/rccontrol
206 mkdir -p $out/nix-support/rccontrol
206 cp -v rhodecode/VERSION $out/nix-support/rccontrol/version
207 cp -v rhodecode/VERSION $out/nix-support/rccontrol/version
207 echo "[DONE ]: enterprise-ce meta information for rccontrol written"
208 echo "[DONE ]: enterprise-ce meta information for rccontrol written"
208
209
209 mkdir -p $out/etc
210 mkdir -p $out/etc
210 cp configs/production.ini $out/etc
211 cp configs/production.ini $out/etc
211 echo "[DONE ]: saved enterprise-ce production.ini into $out/etc"
212 echo "[DONE ]: saved enterprise-ce production.ini into $out/etc"
212
213
213 cp -Rf rhodecode/config/rcextensions $out/etc/rcextensions.tmpl
214 cp -Rf rhodecode/config/rcextensions $out/etc/rcextensions.tmpl
214 echo "[DONE ]: saved enterprise-ce rcextensions into $out/etc/rcextensions.tmpl"
215 echo "[DONE ]: saved enterprise-ce rcextensions into $out/etc/rcextensions.tmpl"
215
216
216 # python based programs need to be wrapped
217 # python based programs need to be wrapped
217 mkdir -p $out/bin
218 mkdir -p $out/bin
218
219
219 # required binaries from dependencies
220 # required binaries from dependencies
220 ln -s ${self.supervisor}/bin/supervisorctl $out/bin/
221 ln -s ${self.supervisor}/bin/supervisorctl $out/bin/
221 ln -s ${self.supervisor}/bin/supervisord $out/bin/
222 ln -s ${self.supervisor}/bin/supervisord $out/bin/
222 ln -s ${self.pastescript}/bin/paster $out/bin/
223 ln -s ${self.pastescript}/bin/paster $out/bin/
223 ln -s ${self.channelstream}/bin/channelstream $out/bin/
224 ln -s ${self.channelstream}/bin/channelstream $out/bin/
224 ln -s ${self.celery}/bin/celery $out/bin/
225 ln -s ${self.celery}/bin/celery $out/bin/
225 ln -s ${self.gunicorn}/bin/gunicorn $out/bin/
226 ln -s ${self.gunicorn}/bin/gunicorn $out/bin/
226 ln -s ${self.pyramid}/bin/prequest $out/bin/
227 ln -s ${self.pyramid}/bin/prequest $out/bin/
227 ln -s ${self.pyramid}/bin/pserve $out/bin/
228 ln -s ${self.pyramid}/bin/pserve $out/bin/
228
229
229 echo "[DONE ]: created symlinks into $out/bin"
230 echo "[DONE ]: created symlinks into $out/bin"
230 DEPS="$out/bin/supervisorctl \
231 DEPS="$out/bin/supervisorctl \
231 $out/bin/supervisord \
232 $out/bin/supervisord \
232 $out/bin/paster \
233 $out/bin/paster \
233 $out/bin/channelstream \
234 $out/bin/channelstream \
234 $out/bin/celery \
235 $out/bin/celery \
235 $out/bin/gunicorn \
236 $out/bin/gunicorn \
236 $out/bin/prequest \
237 $out/bin/prequest \
237 $out/bin/pserve"
238 $out/bin/pserve"
238
239
239 # wrap only dependency scripts, they require to have full PYTHONPATH set
240 # wrap only dependency scripts, they require to have full PYTHONPATH set
240 # to be able to import all packages
241 # to be able to import all packages
241 for file in $DEPS;
242 for file in $DEPS;
242 do
243 do
243 wrapProgram $file \
244 wrapProgram $file \
244 --prefix PATH : $PATH \
245 --prefix PATH : $PATH \
245 --prefix PYTHONPATH : $PYTHONPATH \
246 --prefix PYTHONPATH : $PYTHONPATH \
246 --set PYTHONHASHSEED random
247 --set PYTHONHASHSEED random
247 done
248 done
248
249
249 echo "[DONE ]: enterprise-ce binary wrapping"
250 echo "[DONE ]: enterprise-ce binary wrapping"
250
251 # rhodecode-tools don't need wrapping
251 # rhodecode-tools don't need wrapping
252 ln -s ${self.rhodecode-tools}/bin/rhodecode-* $out/bin/
252 ln -s ${self.rhodecode-tools}/bin/rhodecode-* $out/bin/
253
253
254 # expose sources of CE
254 # expose sources of CE
255 ln -s $out $out/etc/rhodecode_enterprise_ce_source
255 ln -s $out $out/etc/rhodecode_enterprise_ce_source
256
256
257 # expose static files folder
257 # expose static files folder
258 cp -Rf $out/lib/${self.python.libPrefix}/site-packages/rhodecode/public/ $out/etc/static
258 cp -Rf $out/lib/${self.python.libPrefix}/site-packages/rhodecode/public/ $out/etc/static
259 chmod 755 -R $out/etc/static
259 chmod 755 -R $out/etc/static
260
260
261 '';
261 '';
262 });
263
262
263 });
264 };
264 };
265
265
266
266 basePythonPackages = with builtins;
267 basePythonPackages = with builtins;
267 if isAttrs pythonPackages then
268 if isAttrs pythonPackages then
268 pythonPackages
269 pythonPackages
269 else
270 else
270 getAttr pythonPackages pkgs;
271 getAttr pythonPackages pkgs;
271
272
272 pythonGeneratedPackages = import ./pkgs/python-packages.nix {
273 pythonGeneratedPackages = import ./pkgs/python-packages.nix {
273 inherit
274 inherit pkgs;
274 pkgs;
275 inherit (pkgs) fetchurl fetchgit fetchhg;
275 inherit
276 (pkgs)
277 fetchurl
278 fetchgit
279 fetchhg;
280 };
276 };
281
277
282 pythonCommunityOverrides = import ./pkgs/python-packages-overrides.nix {
278 pythonCommunityOverrides = import ./pkgs/python-packages-overrides.nix {
283 inherit pkgs basePythonPackages;
279 inherit pkgs basePythonPackages;
284 };
280 };
285
281
286 # Apply all overrides and fix the final package set
282 # Apply all overrides and fix the final package set
287 myPythonPackagesUnfix = with pkgs.lib;
283 myPythonPackagesUnfix = with pkgs.lib;
288 (extends pythonExternalOverrides
284 (extends pythonExternalOverrides
289 (extends pythonLocalOverrides
285 (extends pythonLocalOverrides
290 (extends pythonCommunityOverrides
286 (extends pythonCommunityOverrides
291 (extends pythonGeneratedPackages
287 (extends pythonGeneratedPackages
292 basePythonPackagesUnfix))));
288 basePythonPackagesUnfix))));
293
289
294 myPythonPackages = (pkgs.lib.fix myPythonPackagesUnfix);
290 myPythonPackages = (pkgs.lib.fix myPythonPackagesUnfix);
295
291
296 in myPythonPackages.rhodecode-enterprise-ce
292 in myPythonPackages.rhodecode-enterprise-ce
@@ -1,62 +1,62 b''
1 {
1 {
2 "name": "rhodecode-enterprise",
2 "name": "rhodecode-enterprise",
3 "version": "2.0.0",
3 "version": "4.19.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",
12 "appenlight-client": "git+https://git@github.com/AppEnlight/appenlight-client-js.git#0.5.1",
13 "clipboard": "^2.0.1",
13 "clipboard": "^2.0.1",
14 "exports-loader": "^0.6.4",
14 "exports-loader": "^0.6.4",
15 "favico.js": "^0.3.10",
15 "favico.js": "^0.3.10",
16 "dropzone": "^5.5.0",
16 "dropzone": "^5.5.0",
17 "grunt": "^0.4.5",
17 "grunt": "^0.4.5",
18 "grunt-cli": "^1.3.1",
18 "grunt-cli": "^1.3.1",
19 "grunt-contrib-concat": "^0.5.1",
19 "grunt-contrib-concat": "^0.5.1",
20 "grunt-contrib-copy": "^1.0.0",
20 "grunt-contrib-copy": "^1.0.0",
21 "grunt-contrib-jshint": "^0.12.0",
21 "grunt-contrib-jshint": "^0.12.0",
22 "grunt-contrib-less": "^1.1.0",
22 "grunt-contrib-less": "^1.1.0",
23 "grunt-contrib-watch": "^0.6.1",
23 "grunt-contrib-watch": "^0.6.1",
24 "grunt-webpack": "^3.1.3",
24 "grunt-webpack": "^3.1.3",
25 "grunt-contrib-uglify": "^4.0.1",
25 "grunt-contrib-uglify": "^4.0.1",
26 "sweetalert2": "^9.10.12",
26 "sweetalert2": "^9.10.12",
27 "jquery": "1.11.3",
27 "jquery": "1.11.3",
28 "mark.js": "8.11.1",
28 "mark.js": "8.11.1",
29 "jshint": "^2.9.1-rc3",
29 "jshint": "^2.9.1-rc3",
30 "moment": "^2.18.1",
30 "moment": "^2.18.1",
31 "mousetrap": "^1.6.1",
31 "mousetrap": "^1.6.1",
32 "qrious": "^4.0.2",
32 "qrious": "^4.0.2",
33 "sticky-sidebar": "3.3.1",
33 "sticky-sidebar": "3.3.1",
34 "waypoints": "4.0.1",
34 "waypoints": "4.0.1",
35 "webpack": "4.23.1",
35 "webpack": "4.23.1",
36 "webpack-cli": "3.1.2",
36 "webpack-cli": "3.1.2",
37 "babel-core": "^6.26.3",
37 "babel-core": "^6.26.3",
38 "babel-loader": "^7.1.2",
38 "babel-loader": "^7.1.2",
39 "babel-plugin-transform-object-rest-spread": "^6.26.0",
39 "babel-plugin-transform-object-rest-spread": "^6.26.0",
40 "babel-preset-env": "^1.6.0",
40 "babel-preset-env": "^1.6.0",
41 "copy-webpack-plugin": "^4.4.2",
41 "copy-webpack-plugin": "^4.4.2",
42 "css-loader": "^0.28.11",
42 "css-loader": "^0.28.11",
43 "html-loader": "^0.4.4",
43 "html-loader": "^0.4.4",
44 "html-webpack-plugin": "^3.2.0",
44 "html-webpack-plugin": "^3.2.0",
45 "imports-loader": "^0.7.1",
45 "imports-loader": "^0.7.1",
46 "polymer-webpack-loader": "^2.0.1",
46 "polymer-webpack-loader": "^2.0.1",
47 "style-loader": "^0.21.0",
47 "style-loader": "^0.21.0",
48 "webpack-uglify-js-plugin": "^1.1.9",
48 "webpack-uglify-js-plugin": "^1.1.9",
49 "raw-loader": "1.0.0-beta.0",
49 "raw-loader": "1.0.0-beta.0",
50 "ts-loader": "^1.3.3",
50 "ts-loader": "^1.3.3",
51 "@webcomponents/webcomponentsjs": "^2.0.0",
51 "@webcomponents/webcomponentsjs": "^2.0.0",
52 "@polymer/polymer": "^3.0.0",
52 "@polymer/polymer": "^3.0.0",
53 "@polymer/paper-button": "^3.0.0",
53 "@polymer/paper-button": "^3.0.0",
54 "@polymer/paper-spinner": "^3.0.0",
54 "@polymer/paper-spinner": "^3.0.0",
55 "@polymer/paper-tooltip": "^3.0.0",
55 "@polymer/paper-tooltip": "^3.0.0",
56 "@polymer/paper-toast": "^3.0.0",
56 "@polymer/paper-toast": "^3.0.0",
57 "@polymer/paper-toggle-button": "^3.0.0",
57 "@polymer/paper-toggle-button": "^3.0.0",
58 "@polymer/iron-ajax": "^3.0.0",
58 "@polymer/iron-ajax": "^3.0.0",
59 "@polymer/iron-autogrow-textarea": "^3.0.0",
59 "@polymer/iron-autogrow-textarea": "^3.0.0",
60 "@polymer/iron-a11y-keys": "^3.0.0"
60 "@polymer/iron-a11y-keys": "^3.0.0"
61 }
61 }
62 }
62 }
@@ -1,17 +1,17 b''
1 # This file has been generated by node2nix 1.6.0. Do not edit!
1 # This file has been generated by node2nix 1.8.0. Do not edit!
2
2
3 {pkgs ? import <nixpkgs> {
3 {pkgs ? import <nixpkgs> {
4 inherit system;
4 inherit system;
5 }, system ? builtins.currentSystem, nodejs ? pkgs."nodejs-8_x"}:
5 }, system ? builtins.currentSystem, nodejs ? pkgs."nodejs-12_x"}:
6
6
7 let
7 let
8 nodeEnv = import ./node-env.nix {
8 nodeEnv = import ./node-env.nix {
9 inherit (pkgs) stdenv python2 utillinux runCommand writeTextFile;
9 inherit (pkgs) stdenv python2 utillinux runCommand writeTextFile;
10 inherit nodejs;
10 inherit nodejs;
11 libtool = if pkgs.stdenv.isDarwin then pkgs.darwin.cctools else null;
11 libtool = if pkgs.stdenv.isDarwin then pkgs.darwin.cctools else null;
12 };
12 };
13 in
13 in
14 import ./node-packages.nix {
14 import ./node-packages.nix {
15 inherit (pkgs) fetchurl fetchgit;
15 inherit (pkgs) fetchurl fetchgit;
16 inherit nodeEnv;
16 inherit nodeEnv;
17 } No newline at end of file
17 }
@@ -1,279 +1,315 b''
1 # Overrides for the generated python-packages.nix
1 # Overrides for the generated python-packages.nix
2 #
2 #
3 # This function is intended to be used as an extension to the generated file
3 # This function is intended to be used as an extension to the generated file
4 # python-packages.nix. The main objective is to add needed dependencies of C
4 # python-packages.nix. The main objective is to add needed dependencies of C
5 # libraries and tweak the build instructions where needed.
5 # libraries and tweak the build instructions where needed.
6
6
7 { pkgs
7 { pkgs
8 , basePythonPackages
8 , basePythonPackages
9 }:
9 }:
10
10
11 let
11 let
12 sed = "sed -i";
12 sed = "sed -i";
13
13
14 localLicenses = {
14 localLicenses = {
15 repoze = {
15 repoze = {
16 fullName = "Repoze License";
16 fullName = "Repoze License";
17 url = http://www.repoze.org/LICENSE.txt;
17 url = http://www.repoze.org/LICENSE.txt;
18 };
18 };
19
20 unlicense = {
21 spdxId = "Unlicense";
22 fullName = "The Unlicense";
23 url = http://unlicense.org/;
24 };
19 };
25 };
20
26
21 in
27 in
22
28
23 self: super: {
29 self: super: {
24
30
25 "appenlight-client" = super."appenlight-client".override (attrs: {
26 meta = {
27 license = [ pkgs.lib.licenses.bsdOriginal ];
28 };
29 });
30
31 "beaker" = super."beaker".override (attrs: {
31 "beaker" = super."beaker".override (attrs: {
32 patches = [
32 patches = [
33 ./patches/beaker/patch-beaker-lock-func-debug.diff
33 ./patches/beaker/patch-beaker-lock-func-debug.diff
34 ./patches/beaker/patch-beaker-metadata-reuse.diff
34 ./patches/beaker/patch-beaker-metadata-reuse.diff
35 ];
35 ];
36 });
36 });
37
37
38 "cffi" = super."cffi".override (attrs: {
38 "cffi" = super."cffi".override (attrs: {
39 buildInputs = [
39 buildInputs = with self; attrs.buildInputs ++ [
40 pkgs.libffi
40 pkgs.libffi
41 ];
41 ];
42 });
42 });
43
43
44 "cryptography" = super."cryptography".override (attrs: {
44 "cryptography" = super."cryptography".override (attrs: {
45 buildInputs = [
45 buildInputs = with self; attrs.buildInputs ++ [
46 pkgs.openssl
46 pkgs.openssl
47 ];
47 ];
48 });
48 });
49
49
50 "gevent" = super."gevent".override (attrs: {
50 "gevent" = super."gevent".override (attrs: {
51 propagatedBuildInputs = attrs.propagatedBuildInputs ++ [
51 propagatedBuildInputs = with self; attrs.propagatedBuildInputs ++ [
52 # NOTE: (marcink) odd requirements from gevent aren't set properly,
52 # NOTE: (marcink) odd requirements from gevent aren't set properly,
53 # thus we need to inject psutil manually
53 # thus we need to inject psutil manually
54 self."psutil"
54 self."psutil"
55 ];
55 ];
56 });
56 });
57
57
58 "future" = super."future".override (attrs: {
59 meta = {
60 license = [ pkgs.lib.licenses.mit ];
61 };
62 });
63
64 "testpath" = super."testpath".override (attrs: {
65 meta = {
66 license = [ pkgs.lib.licenses.mit ];
67 };
68 });
69
70 "gnureadline" = super."gnureadline".override (attrs: {
58 "gnureadline" = super."gnureadline".override (attrs: {
71 buildInputs = [
59 buildInputs = with self; attrs.buildInputs ++ [
72 pkgs.ncurses
60 pkgs.ncurses
73 ];
61 ];
74 patchPhase = ''
62 patchPhase = ''
75 substituteInPlace setup.py --replace "/bin/bash" "${pkgs.bash}/bin/bash"
63 substituteInPlace setup.py --replace "/bin/bash" "${pkgs.bash}/bin/bash"
76 '';
64 '';
77 });
65 });
78
66
79 "gunicorn" = super."gunicorn".override (attrs: {
67 "gunicorn" = super."gunicorn".override (attrs: {
80 propagatedBuildInputs = [
68 propagatedBuildInputs = with self; attrs.propagatedBuildInputs ++ [
81 # johbo: futures is needed as long as we are on Python 2, otherwise
69 # johbo: futures is needed as long as we are on Python 2, otherwise
82 # gunicorn explodes if used with multiple threads per worker.
70 # gunicorn explodes if used with multiple threads per worker.
83 self."futures"
71 self."futures"
84 ];
72 ];
85 });
73 });
86
74
87 "nbconvert" = super."nbconvert".override (attrs: {
75 "nbconvert" = super."nbconvert".override (attrs: {
88 propagatedBuildInputs = attrs.propagatedBuildInputs ++ [
76 propagatedBuildInputs = with self; attrs.propagatedBuildInputs ++ [
89 # marcink: plug in jupyter-client for notebook rendering
77 # marcink: plug in jupyter-client for notebook rendering
90 self."jupyter-client"
78 self."jupyter-client"
91 ];
79 ];
92 });
80 });
93
81
94 "ipython" = super."ipython".override (attrs: {
82 "ipython" = super."ipython".override (attrs: {
95 propagatedBuildInputs = attrs.propagatedBuildInputs ++ [
83 propagatedBuildInputs = with self; attrs.propagatedBuildInputs ++ [
96 self."gnureadline"
84 self."gnureadline"
97 ];
85 ];
98 });
86 });
99
87
100 "lxml" = super."lxml".override (attrs: {
88 "lxml" = super."lxml".override (attrs: {
101 buildInputs = [
89 nativeBuildInputs = with self; attrs.nativeBuildInputs ++ [
90 pkgs.libxml2.dev
91 pkgs.libxslt.dev
92 self.cython
93 ];
94
95 buildInputs = with self; attrs.buildInputs ++ [
102 pkgs.libxml2
96 pkgs.libxml2
103 pkgs.libxslt
97 pkgs.libxslt
98 pkgs.zlib
104 ];
99 ];
105 propagatedBuildInputs = [
100
106 # Needed, so that "setup.py bdist_wheel" does work
101 # propagatedBuildInputs = [
107 self."wheel"
102 # # Needed, so that "setup.py bdist_wheel" does work
108 ];
103 # self."wheel"
104 # ];
109 });
105 });
110
106
111 "mysql-python" = super."mysql-python".override (attrs: {
107 "mysqlclient" = super."mysqlclient".override (attrs: {
112 buildInputs = [
108 nativeBuildInputs = with self; attrs.nativeBuildInputs ++ [
109 pkgs.libmysqlclient
113 pkgs.openssl
110 pkgs.openssl
114 ];
115 propagatedBuildInputs = [
116 pkgs.libmysql
117 pkgs.zlib
111 pkgs.zlib
118 ];
112 ];
113
119 });
114 });
120
115
121 "psycopg2" = super."psycopg2".override (attrs: {
116 "psycopg2" = super."psycopg2".override (attrs: {
122 propagatedBuildInputs = [
117 nativeBuildInputs = with self; attrs.nativeBuildInputs ++ [
123 pkgs.postgresql
118 pkgs.postgresql
124 ];
119 ];
125 meta = {
120 meta = {
126 license = pkgs.lib.licenses.lgpl3Plus;
121 license = pkgs.lib.licenses.lgpl3Plus;
127 };
122 };
128 });
123 });
129
124
130 "pycurl" = super."pycurl".override (attrs: {
125 "pycurl" = super."pycurl".override (attrs: {
131 propagatedBuildInputs = [
126 nativeBuildInputs = with self; attrs.nativeBuildInputs ++ [
127 pkgs.curl
128 pkgs.openssl
129 ];
130
131 propagatedBuildInputs = with self; attrs.propagatedBuildInputs ++ [
132 pkgs.curl
132 pkgs.curl
133 pkgs.openssl
133 pkgs.openssl
134 ];
134 ];
135
135
136 preConfigure = ''
136 preConfigure = ''
137 substituteInPlace setup.py --replace '--static-libs' '--libs'
137 substituteInPlace setup.py --replace '--static-libs' '--libs'
138 export PYCURL_SSL_LIBRARY=openssl
138 export PYCURL_SSL_LIBRARY=openssl
139 '';
139 '';
140
140
141 meta = {
141 meta = {
142 license = pkgs.lib.licenses.mit;
142 license = pkgs.lib.licenses.mit;
143 };
143 };
144 });
144 });
145
145
146 "pyramid" = super."pyramid".override (attrs: {
147 meta = {
148 license = localLicenses.repoze;
149 };
150 });
151
152 "pyramid-debugtoolbar" = super."pyramid-debugtoolbar".override (attrs: {
153 meta = {
154 license = [ pkgs.lib.licenses.bsdOriginal localLicenses.repoze ];
155 };
156 });
157
158 "pysqlite" = super."pysqlite".override (attrs: {
146 "pysqlite" = super."pysqlite".override (attrs: {
159 propagatedBuildInputs = [
147 propagatedBuildInputs = with self; attrs.propagatedBuildInputs ++ [
160 pkgs.sqlite
148 pkgs.sqlite
161 ];
149 ];
162 meta = {
150 meta = {
163 license = [ pkgs.lib.licenses.zlib pkgs.lib.licenses.libpng ];
151 license = [ pkgs.lib.licenses.zlib pkgs.lib.licenses.libpng ];
164 };
152 };
165 });
153 });
166
154
167 "python-ldap" = super."python-ldap".override (attrs: {
155 "python-ldap" = super."python-ldap".override (attrs: {
168 propagatedBuildInputs = attrs.propagatedBuildInputs ++ [
156 propagatedBuildInputs = attrs.propagatedBuildInputs ++ [
169 pkgs.openldap
157 pkgs.openldap
170 pkgs.cyrus_sasl
158 pkgs.cyrus_sasl
171 pkgs.openssl
159 pkgs.openssl
172 ];
160 ];
173 });
161 });
174
162
175 "python-pam" = super."python-pam".override (attrs: {
163 "python-pam" = super."python-pam".override (attrs: {
176 propagatedBuildInputs = [
164 propagatedBuildInputs = with self; attrs.propagatedBuildInputs ++ [
177 pkgs.pam
165 pkgs.pam
178 ];
166 ];
179
167
180 # TODO: johbo: Check if this can be avoided, or transform into
168 # TODO: johbo: Check if this can be avoided, or transform into
181 # a real patch
169 # a real patch
182 patchPhase = ''
170 patchPhase = ''
183 substituteInPlace pam.py \
171 substituteInPlace pam.py \
184 --replace 'find_library("pam")' '"${pkgs.pam}/lib/libpam.so.0"'
172 --replace 'find_library("pam")' '"${pkgs.pam}/lib/libpam.so.0"'
185 '';
173 '';
186
174
187 });
175 });
188
176
189 "python-saml" = super."python-saml".override (attrs: {
177 "python-saml" = super."python-saml".override (attrs: {
190 buildInputs = [
178 nativeBuildInputs = with self; attrs.nativeBuildInputs ++ [
191 pkgs.libxml2
179 pkgs.libxml2
192 pkgs.libxslt
180 pkgs.libxslt
193 ];
181 ];
194 });
182 });
195
183
196 "dm.xmlsec.binding" = super."dm.xmlsec.binding".override (attrs: {
184 "dm.xmlsec.binding" = super."dm.xmlsec.binding".override (attrs: {
197 buildInputs = [
185 nativeBuildInputs = with self; attrs.nativeBuildInputs ++ [
186 pkgs.libxml2.dev
187 pkgs.libxslt.dev
188 pkgs.xmlsec
189 pkgs.libtool
190 pkgs.zlib
191 ];
192
193 buildInputs = with self; attrs.buildInputs ++ [
198 pkgs.libxml2
194 pkgs.libxml2
199 pkgs.libxslt
195 pkgs.libxslt
200 pkgs.xmlsec
196 pkgs.xmlsec
201 pkgs.libtool
197 pkgs.libtool
198 pkgs.zlib
202 ];
199 ];
203 });
200 });
204
201
205 "pyzmq" = super."pyzmq".override (attrs: {
202 "pyzmq" = super."pyzmq".override (attrs: {
206 buildInputs = [
203 buildInputs = [
207 pkgs.czmq
204 pkgs.czmq
208 ];
205 ];
209 });
206 });
210
207
208 "supervisor" = super."supervisor".override (attrs: {
209 patches = [
210 ./patches/supervisor/patch-rlimits-old-kernel.diff
211 ];
212 });
213
214 "py" = super."py".override (attrs: {
215 buildInputs = with self; attrs.buildInputs ++ [
216 self."setuptools-scm"
217 ];
218 });
219
220 "importlib-metadata" = super."importlib-metadata".override (attrs: {
221 buildInputs = with self; attrs.buildInputs ++ [
222 self."setuptools-scm"
223 ];
224 });
225
226 # License fixes
227 "appenlight-client" = super."appenlight-client".override (attrs: {
228 meta = {
229 license = [ pkgs.lib.licenses.bsdOriginal ];
230 };
231 });
232
211 "urlobject" = super."urlobject".override (attrs: {
233 "urlobject" = super."urlobject".override (attrs: {
212 meta = {
234 meta = {
213 license = {
235 license = localLicenses.unlicense;
214 spdxId = "Unlicense";
236 };
215 fullName = "The Unlicense";
237 });
216 url = http://unlicense.org/;
238
217 };
239 "future" = super."future".override (attrs: {
240 meta = {
241 license = [ pkgs.lib.licenses.mit ];
242 };
243 });
244
245 "testpath" = super."testpath".override (attrs: {
246 meta = {
247 license = [ pkgs.lib.licenses.mit ];
218 };
248 };
219 });
249 });
220
250
221 "docutils" = super."docutils".override (attrs: {
251 "docutils" = super."docutils".override (attrs: {
222 meta = {
252 meta = {
223 license = pkgs.lib.licenses.bsd2;
253 license = pkgs.lib.licenses.bsd2;
224 };
254 };
225 });
255 });
226
256
227 "colander" = super."colander".override (attrs: {
257 "colander" = super."colander".override (attrs: {
228 meta = {
258 meta = {
229 license = localLicenses.repoze;
259 license = localLicenses.repoze;
230 };
260 };
231 });
261 });
232
262
233 "pyramid-beaker" = super."pyramid-beaker".override (attrs: {
263 "pyramid-beaker" = super."pyramid-beaker".override (attrs: {
234 meta = {
264 meta = {
235 license = localLicenses.repoze;
265 license = localLicenses.repoze;
236 };
266 };
237 });
267 });
238
268
239 "pyramid-mako" = super."pyramid-mako".override (attrs: {
269 "pyramid-mako" = super."pyramid-mako".override (attrs: {
240 meta = {
270 meta = {
241 license = localLicenses.repoze;
271 license = localLicenses.repoze;
242 };
272 };
243 });
273 });
244
274
275 "pyramid" = super."pyramid".override (attrs: {
276 meta = {
277 license = localLicenses.repoze;
278 };
279 });
280
281 "pyramid-debugtoolbar" = super."pyramid-debugtoolbar".override (attrs: {
282 meta = {
283 license = [ pkgs.lib.licenses.bsdOriginal localLicenses.repoze ];
284 };
285 });
286
245 "repoze.lru" = super."repoze.lru".override (attrs: {
287 "repoze.lru" = super."repoze.lru".override (attrs: {
246 meta = {
288 meta = {
247 license = localLicenses.repoze;
289 license = localLicenses.repoze;
248 };
290 };
249 });
291 });
250
292
251 "python-editor" = super."python-editor".override (attrs: {
293 "python-editor" = super."python-editor".override (attrs: {
252 meta = {
294 meta = {
253 license = pkgs.lib.licenses.asl20;
295 license = pkgs.lib.licenses.asl20;
254 };
296 };
255 });
297 });
256
298
257 "translationstring" = super."translationstring".override (attrs: {
299 "translationstring" = super."translationstring".override (attrs: {
258 meta = {
300 meta = {
259 license = localLicenses.repoze;
301 license = localLicenses.repoze;
260 };
302 };
261 });
303 });
262
304
263 "venusian" = super."venusian".override (attrs: {
305 "venusian" = super."venusian".override (attrs: {
264 meta = {
306 meta = {
265 license = localLicenses.repoze;
307 license = localLicenses.repoze;
266 };
308 };
267 });
309 });
268
310
269 "supervisor" = super."supervisor".override (attrs: {
270 patches = [
271 ./patches/supervisor/patch-rlimits-old-kernel.diff
272 ];
273 });
274
275 # Avoid that base packages screw up the build process
311 # Avoid that base packages screw up the build process
276 inherit (basePythonPackages)
312 inherit (basePythonPackages)
277 setuptools;
313 setuptools;
278
314
279 }
315 }
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
@@ -1,55 +1,76 b''
1 { pkgs ? (import <nixpkgs> {})
1 { pkgs ? (import <nixpkgs> {})
2 , pythonPackages ? "python27Packages"
2 , pythonPackages ? "python27Packages"
3 }:
3 }:
4
4
5 with pkgs.lib;
5 with pkgs.lib;
6
6
7 let _pythonPackages = pythonPackages; in
7 let
8 _pythonPackages = pythonPackages;
9
10 in
11
8 let
12 let
9 pythonPackages = getAttr _pythonPackages pkgs;
13 pythonPackages = getAttr _pythonPackages pkgs;
10
14
11 pip2nix = import ./nix-common/pip2nix.nix {
15 pip2nix = import ./nix-common/pip2nix.nix {
12 inherit
16 inherit
13 pkgs
17 pkgs
14 pythonPackages;
18 pythonPackages;
15 };
19 };
16
20
17 in
21 in
18
22
19 pkgs.stdenv.mkDerivation {
23 pkgs.stdenv.mkDerivation {
20 name = "pip2nix-generated";
24 name = "pip2nix-generated";
25
21 buildInputs = [
26 buildInputs = [
22 # Allows to generate python packages
27 # Allows to generate python packages
23 pip2nix.pip2nix
28 pip2nix.pip2nix
24 pythonPackages.pip-tools
29 pythonPackages.pip-tools
30 # compile using ffi
31 pkgs.libffi
32
33 pythonPackages.cython
25
34
26 # Allows to generate node dependencies
35 # Allows to generate node dependencies
27 pkgs.nodePackages.node2nix
36 pkgs.nodePackages.node2nix
28
37
29 # We need mysql_config to be around
38 # We need mysql_config to be around
30 pkgs.mysql
39 pkgs.libmysqlclient
31
40
32 # We need postgresql to be around
41 # We need postgresql to be around
33 pkgs.postgresql
42 pkgs.postgresql
34
43
35 # we need the below for saml
44 # we need the below for saml
36 pkgs.libxml2
45 pkgs.libxml2
37 pkgs.libxslt
46 pkgs.libxslt
38 pkgs.xmlsec
47 pkgs.xmlsec
39
48
40 # Curl is needed for pycurl
49 # Curl is needed for pycurl
41 pkgs.curl
50 pkgs.curl
42 ];
51 ];
43
52
53 LC_ALL = "en_US.UTF-8";
54 LOCALE_ARCHIVE =
55 if pkgs.stdenv.isLinux
56 then "${pkgs.glibcLocales}/lib/locale/locale-archive"
57 else "";
58
44 shellHook = ''
59 shellHook = ''
45 runHook preShellHook
60 runHook preShellHook
46 runHook postShellHook
61 runHook postShellHook
47 '';
62 '';
48
63
49 preShellHook = ''
64 preShellHook = ''
50 echo "Starting Generate Shell"
65 echo "Starting Generate Shell"
66 # set unpack source date to 1980 to fix ZIP problems that does not support <1980
67 export SOURCE_DATE_EPOCH=315532800
68 export TMPDIR=/tmp
69
51 # Custom prompt to distinguish from other dev envs.
70 # Custom prompt to distinguish from other dev envs.
52 export PS1="\n\[\033[1;32m\][Generate-shell:\w]$\[\033[0m\] "
71 export PS1="\n\[\033[1;32m\][pip2nix-generate-shell]$\[\033[0m\] "
72
53 export PYCURL_SSL_LIBRARY=openssl
73 export PYCURL_SSL_LIBRARY=openssl
74
54 '';
75 '';
55 }
76 }
@@ -1,123 +1,123 b''
1 ## dependencies
1 ## dependencies
2
2
3 amqp==2.5.2
3 amqp==2.5.2
4 babel==1.3
4 babel==1.3
5 beaker==1.9.1
5 beaker==1.9.1
6 bleach==3.1.3
6 bleach==3.1.3
7 celery==4.3.0
7 celery==4.3.0
8 channelstream==0.5.2
8 channelstream==0.5.2
9 click==7.0
9 click==7.1.2
10 colander==1.7.0
10 colander==1.7.0
11 # our custom configobj
11 # our custom configobj
12 https://code.rhodecode.com/upstream/configobj/artifacts/download/0-012de99a-b1e1-4f64-a5c0-07a98a41b324.tar.gz?md5=6a513f51fe04b2c18cf84c1395a7c626#egg=configobj==5.0.6
12 https://code.rhodecode.com/upstream/configobj/artifacts/download/0-012de99a-b1e1-4f64-a5c0-07a98a41b324.tar.gz?md5=6a513f51fe04b2c18cf84c1395a7c626#egg=configobj==5.0.6
13 cssselect==1.0.3
13 cssselect==1.0.3
14 cryptography==2.6.1
14 cryptography==2.6.1
15 cython==0.29.17
15 decorator==4.1.2
16 decorator==4.1.2
16 deform==2.0.8
17 deform==2.0.8
17 docutils==0.16.0
18 docutils==0.16.0
18 dogpile.cache==0.9.0
19 dogpile.cache==0.9.0
19 dogpile.core==0.4.1
20 dogpile.core==0.4.1
20 formencode==1.2.4
21 formencode==1.2.4
21 future==0.14.3
22 future==0.14.3
22 futures==3.0.2
23 futures==3.0.2
23 infrae.cache==1.0.1
24 infrae.cache==1.0.1
24 iso8601==0.1.12
25 iso8601==0.1.12
25 itsdangerous==0.24
26 itsdangerous==0.24
26 kombu==4.6.6
27 kombu==4.6.6
27 lxml==4.2.5
28 lxml==4.5.0
28 mako==1.1.0
29 mako==1.1.2
29 markdown==2.6.11
30 markdown==2.6.11
30 markupsafe==1.1.1
31 markupsafe==1.1.1
31 msgpack-python==0.5.6
32 msgpack-python==0.5.6
32 pyotp==2.3.0
33 pyotp==2.3.0
33 packaging==20.3
34 packaging==20.3
34 pathlib2==2.3.5
35 pathlib2==2.3.5
35 paste==3.4.0
36 paste==3.4.0
36 pastedeploy==2.1.0
37 pastedeploy==2.1.0
37 pastescript==3.2.0
38 pastescript==3.2.0
38 peppercorn==0.6
39 peppercorn==0.6
39 premailer==3.6.1
40 premailer==3.6.1
40 psutil==5.7.0
41 psutil==5.7.0
41 py-bcrypt==0.4
42 py-bcrypt==0.4
42 pycurl==7.43.0.3
43 pycurl==7.43.0.3
43 pycrypto==2.6.1
44 pycrypto==2.6.1
44 pygments==2.4.2
45 pygments==2.4.2
45 pyparsing==2.4.7
46 pyparsing==2.4.7
46 pyramid-debugtoolbar==4.6.1
47 pyramid-debugtoolbar==4.6.1
47 pyramid-mako==1.1.0
48 pyramid-mako==1.1.0
48 pyramid==1.10.4
49 pyramid==1.10.4
49 pyramid_mailer==0.15.1
50 pyramid_mailer==0.15.1
50 python-dateutil==2.8.1
51 python-dateutil==2.8.1
51 python-ldap==3.2.0
52 python-ldap==3.2.0
52 python-memcached==1.59
53 python-memcached==1.59
53 python-pam==1.8.4
54 python-pam==1.8.4
54 python-saml==2.4.2
55 python-saml==2.4.2
55 pytz==2019.3
56 pytz==2019.3
56 tzlocal==1.5.1
57 tzlocal==1.5.1
57 pyzmq==14.6.0
58 pyzmq==14.6.0
58 py-gfm==0.1.4
59 py-gfm==0.1.4
59 redis==3.4.1
60 redis==3.4.1
60 repoze.lru==0.7
61 repoze.lru==0.7
61 requests==2.22.0
62 requests==2.22.0
62 routes==2.4.1
63 routes==2.4.1
63 simplejson==3.16.0
64 simplejson==3.16.0
64 six==1.11.0
65 six==1.11.0
65 sqlalchemy==1.3.15
66 sqlalchemy==1.3.15
66 sshpubkeys==3.1.0
67 sshpubkeys==3.1.0
67 subprocess32==3.5.4
68 subprocess32==3.5.4
68 supervisor==4.1.0
69 supervisor==4.1.0
69 translationstring==1.3
70 translationstring==1.3
70 urllib3==1.25.2
71 urllib3==1.25.2
71 urlobject==2.4.3
72 urlobject==2.4.3
72 venusian==1.2.0
73 venusian==1.2.0
73 weberror==0.13.1
74 weberror==0.13.1
74 webhelpers2==2.0
75 webhelpers2==2.0
75 webob==1.8.5
76 webob==1.8.5
76 whoosh==2.7.4
77 whoosh==2.7.4
77 wsgiref==0.1.2
78 wsgiref==0.1.2
78 zope.cachedescriptors==4.3.1
79 zope.cachedescriptors==4.3.1
79 zope.deprecation==4.4.0
80 zope.deprecation==4.4.0
80 zope.event==4.4.0
81 zope.event==4.4.0
81 zope.interface==4.6.0
82 zope.interface==4.6.0
82
83
83 # DB drivers
84 # DB drivers
84 mysql-python==1.2.5
85 mysqlclient==1.4.6
85 pymysql==0.8.1
86 pymysql==0.8.1
86 pysqlite==2.8.3
87 pysqlite==2.8.3
87 psycopg2==2.8.4
88 psycopg2==2.8.4
88
89
89 # IPYTHON RENDERING
90 # IPYTHON RENDERING
90 # entrypoints backport, pypi version doesn't support egg installs
91 # entrypoints backport, pypi version doesn't support egg installs
91 https://code.rhodecode.com/upstream/entrypoints/artifacts/download/0-8e9ee9e4-c4db-409c-b07e-81568fd1832d.tar.gz?md5=3a027b8ff1d257b91fe257de6c43357d#egg=entrypoints==0.2.2.rhodecode-upstream1
92 https://code.rhodecode.com/upstream/entrypoints/artifacts/download/0-8e9ee9e4-c4db-409c-b07e-81568fd1832d.tar.gz?md5=3a027b8ff1d257b91fe257de6c43357d#egg=entrypoints==0.2.2.rhodecode-upstream1
92 nbconvert==5.3.1
93 nbconvert==5.3.1
93 nbformat==4.4.0
94 nbformat==4.4.0
94 jupyter-client==5.0.0
95 jupyter-client==5.0.0
95 jupyter-core==4.5.0
96 jupyter-core==4.5.0
96
97
97 ## cli tools
98 ## cli tools
98 alembic==1.4.2
99 alembic==1.4.2
99 invoke==0.13.0
100 invoke==0.13.0
100 bumpversion==0.5.3
101 bumpversion==0.5.3
101
102
102 ## http servers
103 ## http servers
103 gevent==1.5.0
104 gevent==1.5.0
104 greenlet==0.4.15
105 greenlet==0.4.15
105 gunicorn==19.9.0
106 gunicorn==19.9.0
106 waitress==1.3.1
107 waitress==1.3.1
107
108
108 ## debug
109 ## debug
109 ipdb==0.13.2
110 ipdb==0.13.2
110 ipython==5.1.0
111 ipython==5.10.0
111
112
112 ## rhodecode-tools, special case, use file://PATH.tar.gz#egg=rhodecode-tools==X.Y.Z, to test local version
113 ## rhodecode-tools, special case, use file://PATH.tar.gz#egg=rhodecode-tools==X.Y.Z, to test local version
113 https://code.rhodecode.com/rhodecode-tools-ce/artifacts/download/0-ed54e749-2ef5-4bc7-ae7f-7900e3c2aa15.tar.gz?sha256=76f024bad3a1e55fdb3d64f13f5b77ff21a12fee699918de2110fe21effd5a3a#egg=rhodecode-tools==1.4.0
114 https://code.rhodecode.com/rhodecode-tools-ce/artifacts/download/0-0cf09d55-fcb5-4ab0-ad48-e71f65090875.tar.gz?sha256=ae458b6845f278aed1bcb90939ef01cdb581016ba0e7f58602d1ac6513f94707#egg=rhodecode-tools==2.0.0
114
115
115
116 ## appenlight
116 ## appenlight
117 appenlight-client==0.6.26
117 appenlight-client==0.6.26
118
118
119 ## test related requirements
119 ## test related requirements
120 -r requirements_test.txt
120 -r requirements_test.txt
121
121
122 ## uncomment to add the debug libraries
122 ## uncomment to add the debug libraries
123 #-r requirements_debug.txt
123 #-r requirements_debug.txt
@@ -1,27 +1,33 b''
1 # contains not directly required libraries we want to pin the version.
1 # contains not directly required libraries we want to pin the version.
2
2
3 atomicwrites==1.3.0
3 atomicwrites==1.4.0
4 attrs==19.3.0
4 attrs==19.3.0
5 asn1crypto==0.24.0
5 asn1crypto==0.24.0
6 billiard==3.6.1.0
6 billiard==3.6.1.0
7 cffi==1.12.3
7 cffi==1.12.3
8 chameleon==2.24
8 chameleon==2.24
9 configparser==4.0.2
9 configparser==4.0.2
10 contextlib2==0.6.0.post1
10 contextlib2==0.6.0.post1
11 ecdsa==0.13.2
11 ecdsa==0.13.2
12 gnureadline==6.3.8
12 gnureadline==6.3.8
13 hupper==1.10.2
13 hupper==1.10.2
14 ipaddress==1.0.23
14 ipaddress==1.0.23
15 importlib-metadata==1.6.0
15 importlib-metadata==1.6.0
16 jinja2==2.9.6
16 jinja2==2.9.6
17 jsonschema==2.6.0
17 jsonschema==2.6.0
18 pluggy==0.13.1
18 pluggy==0.13.1
19 pyasn1-modules==0.2.6
19 pyasn1-modules==0.2.6
20 pyramid-jinja2==2.7
20 pyramid-jinja2==2.7
21 scandir==1.10.0
21 scandir==1.10.0
22 setproctitle==1.1.10
22 setproctitle==1.1.10
23 tempita==0.5.2
23 tempita==0.5.2
24 testpath==0.4.4
24
25 transaction==2.4.0
25 transaction==2.4.0
26 vine==1.3.0
26 vine==1.3.0
27 wcwidth==0.1.9
27 wcwidth==0.1.9
28
29 # ptyprocess backport, pypi version doesn't support egg/source installs on python 2.X
30 https://code.rhodecode.com/upstream/ptyprocess/artifacts/download/0-c8b019b1-c4d3-46ac-a0ad-1206ec3fb3cb.tar.gz?sha256=50394f2c5e117fcab4360bf99c8bc40be7211ee1a5860aeb3809b44249550c3e#egg=ptyprocess==0.6.0.rhodecode-upstream1
31
32 # testpath backport, pypi version doesn't support egg/source installs on python 2.X
33 https://code.rhodecode.com/upstream/testpath/artifacts/download/0-618e6b32-6ca5-428a-bda0-494bb347a56d.tar.gz?sha256=fd95bafd89ee2fb2bb0d82be34c9c5bba3a290f52cafc67a12a74ef825527019#egg=testpath==0.4.4.rhodecode-upstream1
@@ -1,16 +1,16 b''
1 # test related requirements
1 # test related requirements
2 pytest==4.6.5
2 pytest==4.6.9
3 py==1.8.0
3 py==1.8.1
4 pytest-cov==2.7.1
4 pytest-cov==2.8.1
5 pytest-sugar==0.9.2
5 pytest-sugar==0.9.3
6 pytest-runner==5.1.0
6 pytest-runner==5.2.0
7 pytest-profiling==1.7.0
7 pytest-profiling==1.7.0
8 pytest-timeout==1.3.3
8 pytest-timeout==1.3.3
9 gprof2dot==2017.9.19
9 gprof2dot==2017.9.19
10
10
11 mock==3.0.5
11 mock==3.0.5
12 cov-core==1.15.0
12 cov-core==1.15.0
13 coverage==4.5.4
13 coverage==4.5.4
14
14
15 webtest==2.0.34
15 webtest==2.0.34
16 beautifulsoup4==4.6.3
16 beautifulsoup4==4.6.3
@@ -1,43 +1,39 b''
1 [aliases]
1 [aliases]
2 test = pytest
2 test = pytest
3
3
4 [egg_info]
5 tag_build =
6 tag_svn_revision = false
7
8 # Babel configuration
4 # Babel configuration
9 [compile_catalog]
5 [compile_catalog]
10 domain = rhodecode
6 domain = rhodecode
11 directory = rhodecode/i18n
7 directory = rhodecode/i18n
12 statistics = true
8 statistics = true
13
9
14 [extract_messages]
10 [extract_messages]
15 add_comments = TRANSLATORS:
11 add_comments = TRANSLATORS:
16 output_file = rhodecode/i18n/rhodecode.pot
12 output_file = rhodecode/i18n/rhodecode.pot
17 msgid-bugs-address = marcin@rhodecode.com
13 msgid-bugs-address = marcin@rhodecode.com
18 copyright-holder = RhodeCode GmbH
14 copyright-holder = RhodeCode GmbH
19 no-wrap = true
15 no-wrap = true
20 keywords =
16 keywords =
21 lazy_ugettext
17 lazy_ugettext
22 _ngettext
18 _ngettext
23 _gettext
19 _gettext
24 gettext_translator
20 gettext_translator
25
21
26 [init_catalog]
22 [init_catalog]
27 domain = rhodecode
23 domain = rhodecode
28 input_file = rhodecode/i18n/rhodecode.pot
24 input_file = rhodecode/i18n/rhodecode.pot
29 output_dir = rhodecode/i18n
25 output_dir = rhodecode/i18n
30
26
31 [update_catalog]
27 [update_catalog]
32 domain = rhodecode
28 domain = rhodecode
33 input_file = rhodecode/i18n/rhodecode.pot
29 input_file = rhodecode/i18n/rhodecode.pot
34 output_dir = rhodecode/i18n
30 output_dir = rhodecode/i18n
35 previous = true
31 previous = true
36
32
37 [build_sphinx]
33 [build_sphinx]
38 source-dir = docs/
34 source-dir = docs/
39 build-dir = docs/_build
35 build-dir = docs/_build
40 all_files = 1
36 all_files = 1
41
37
42 [upload_sphinx]
38 [upload_sphinx]
43 upload-dir = docs/_build/html
39 upload-dir = docs/_build/html
@@ -1,119 +1,139 b''
1 # This file contains the adjustments which are desired for a development
1 # This file contains the adjustments which are desired for a development
2 # environment.
2 # environment.
3
3
4 { pkgs ? (import <nixpkgs> {})
4 { pkgs ? (import <nixpkgs> {})
5 , pythonPackages ? "python27Packages"
5 , pythonPackages ? "python27Packages"
6 , doCheck ? false
6 , doCheck ? false
7 , sourcesOverrides ? {}
7 , sourcesOverrides ? {}
8 , doDevelopInstall ? true
8 , doDevelopInstall ? true
9 , doReleaseInstall ? false
9 , doReleaseInstall ? false
10 }:
10 }:
11
11
12 let
12 let
13 # Get sources from config and update them with overrides.
13 # Get sources from config and update them with overrides.
14 sources = (pkgs.config.rc.sources or {}) // sourcesOverrides;
14 sources = (pkgs.config.rc.sources or {}) // sourcesOverrides;
15
15
16 enterprise-ce = import ./default.nix {
16 enterprise-ce = import ./default.nix {
17 inherit
17 inherit
18 pythonPackages
18 pythonPackages
19 doCheck;
19 doCheck;
20 };
20 };
21
21
22 ce-pythonPackages = enterprise-ce.pythonPackages;
22 ce-pythonPackages = enterprise-ce.pythonPackages;
23
23
24 # This method looks up a path from `pkgs.config.rc.sources` and returns a
24 # This method looks up a path from `pkgs.config.rc.sources` and returns a
25 # shell script which does a `python setup.py develop` installation of it. If
25 # shell script which does a `python setup.py develop` installation of it. If
26 # no path is found it will return an empty string.
26 # no path is found it will return an empty string.
27 optionalDevelopInstall = attributeName:
27 optionalDevelopInstall = attributeName:
28 let
28 let
29 path = pkgs.lib.attrByPath [attributeName] null sources;
29 path = pkgs.lib.attrByPath [attributeName] null sources;
30 doIt = doDevelopInstall && path != null;
30 doDI = doDevelopInstall && path != null;
31
31
32 in
32 in
33 # do develop installation with empty hosts to skip any package duplicates to
33 # do develop installation with empty hosts to skip any package duplicates to
34 # be replaced. This only pushes the package to be locally available
34 # be replaced. This only pushes the package to be locally available
35 pkgs.lib.optionalString doIt (''
35 pkgs.lib.optionalString doDI (''
36 echo "[BEGIN] Develop install of '${attributeName}' from '${path}'"
36 echo "[BEGIN] Develop install of '${attributeName}' from '${path}'"
37 pushd ${path}
37 pushd ${path}
38 python setup.py develop --prefix $tmp_path --allow-hosts ""
38 python setup.py develop --prefix $tmp_path --allow-hosts ""
39 popd
39 popd
40 echo "[DONE] Develop install of '${attributeName}' from '${path}'"
40 echo "[DONE] Develop install of '${attributeName}' from '${path}'"
41 echo ""
41 echo ""
42 '');
42 '');
43
43
44 # This method looks up a path from `pkgs.config.rc.sources` and imports the
44 # This method looks up a path from `pkgs.config.rc.sources` and imports the
45 # default.nix file if it exists. It returns the list of build inputs. If no
45 # default.nix file if it exists. It returns the list of build inputs. If no
46 # path is found it will return an empty list.
46 # path is found it will return an empty list.
47 optionalDevelopInstallBuildInputs = attributeName:
47 optionalDevelopInstallBuildInputs = attributeName:
48 let
48 let
49 path = pkgs.lib.attrByPath [attributeName] null sources;
49 path = pkgs.lib.attrByPath [attributeName] null sources;
50 doIt = doDevelopInstall && path != null && pkgs.lib.pathExists "${nixFile}";
51 nixFile = "${path}/default.nix";
50 nixFile = "${path}/default.nix";
51 doDI = doDevelopInstall && path != null && pkgs.lib.pathExists "${nixFile}";
52
52
53 derivate = import "${nixFile}" {
53 derivate = import "${nixFile}" {
54 inherit
54 inherit
55 doCheck
55 doCheck
56 pythonPackages;
56 pythonPackages;
57 };
57 };
58 in
58 in
59 pkgs.lib.lists.optionals doIt (
59 pkgs.lib.lists.optionals doDI (
60 derivate.propagatedBuildInputs
60 derivate.propagatedBuildInputs
61 );
61 );
62
62
63 optionalBinDeps = attributeName:
64 let
65 path = pkgs.lib.attrByPath [attributeName] null sources;
66 nixFile = "${path}/default.nix";
67 doDI = doDevelopInstall && path != null && pkgs.lib.pathExists "${nixFile}";
68
69 derivate = import "${nixFile}" {
70 inherit
71 doCheck
72 pythonPackages;
73 };
74 in
75 pkgs.lib.optionalString doDI (''
76 echo "Wrapping PATH with vcsserver vcs binaries"
77 export PATH="${derivate.vcs_pkgs.subversion}/bin:${derivate.vcs_pkgs.git}/bin:${derivate.pythonPackages.mercurial}/bin:$PATH"
78 '');
79
63 developInstalls = [ "rhodecode-vcsserver" ];
80 developInstalls = [ "rhodecode-vcsserver" ];
64
81
65 in enterprise-ce.override (attrs: {
82 in enterprise-ce.override (attrs: rec {
66 # Avoid that we dump any sources into the store when entering the shell and
83 # Avoid that we dump any sources into the store when entering the shell and
67 # make development a little bit more convenient.
84 # make development a little bit more convenient.
68 src = null;
85 src = null;
69
86
70 # Add dependencies which are useful for the development environment.
87 # Add dependencies which are useful for the development environment.
71 buildInputs =
88 buildInputs =
72 attrs.buildInputs ++
89 attrs.buildInputs ++
73 (with ce-pythonPackages;
90 (with ce-pythonPackages;
74 [ ipdb ]
91 [ ipdb ]
75 ++ pkgs.lib.lists.optionals doReleaseInstall (
92 ++ pkgs.lib.lists.optionals doReleaseInstall (
76 [invoke bumpversion]
93 [invoke bumpversion]
77 )
94 )
78 );
95 );
79
96
80 # place to inject some required libs from develop installs
97 # place to inject some required libs from develop installs
81 propagatedBuildInputs =
98 propagatedBuildInputs =
82 attrs.propagatedBuildInputs ++
99 attrs.propagatedBuildInputs ++
83 pkgs.lib.lists.concatMap optionalDevelopInstallBuildInputs developInstalls;
100 pkgs.lib.lists.concatMap optionalDevelopInstallBuildInputs developInstalls;
84
101
85
102
86 # Make sure we execute both hooks
103 # Make sure we execute both hooks
87 shellHook = ''
104 shellHook = ''
88 runHook preShellHook
105 runHook preShellHook
89 runHook postShellHook
106 runHook postShellHook
90 '';
107 '';
91
108
92 preShellHook = ''
109 preShellHook = ''
93 echo "Entering CE-Shell"
110 echo "Entering rhodecode-ce"
94
111
95 # Custom prompt to distinguish from other dev envs.
112 # Custom prompt to distinguish from other dev envs.
96 export PS1="\n\[\033[1;32m\][CE-shell:\w]$\[\033[0m\] "
113 export PS1="\n\[\033[1;32m\][rhodecode-ce-shell:\w]$\[\033[0m\] "
114
115 # Set locale
116 export LOCALE_ARCHIVE="${pkgs.glibcLocales}/lib/locale/locale-archive"
117 export LC_ALL="en_US.UTF-8"
97
118
98 echo "Building frontend assets"
119 echo "Building frontend assets"
99 ${enterprise-ce.linkNodePackages}
120 ${enterprise-ce.linkNodePackages}
100
121
101 # Setup a temporary directory.
122 # Setup a temporary directory.
102 tmp_path=$(mktemp -d)
123 tmp_path=$(mktemp -d)
103 export PATH="$tmp_path/bin:$PATH"
124 export PATH="$tmp_path/bin:$PATH"
104 export PYTHONPATH="$tmp_path/${ce-pythonPackages.python.sitePackages}:$PYTHONPATH"
125 export PYTHONPATH="$tmp_path/${ce-pythonPackages.python.sitePackages}:$PYTHONPATH"
105 mkdir -p $tmp_path/${ce-pythonPackages.python.sitePackages}
126 mkdir -p $tmp_path/${ce-pythonPackages.python.sitePackages}
106
127
107 # Develop installation
128 # Develop installation
108 echo "[BEGIN]: develop install of rhodecode-enterprise-ce"
129 echo "[BEGIN]: develop install of rhodecode-enterprise-ce"
109 python setup.py develop --prefix $tmp_path --allow-hosts ""
130 python setup.py develop --prefix $tmp_path --allow-hosts ""
110 '';
131 '';
111
132
112 postShellHook = ''
133 postShellHook = ''
113 echo "** Additional develop installs **"
134 echo "** Additional develop installs **"
114 '' +
135 '' + pkgs.lib.strings.concatMapStrings optionalDevelopInstall developInstalls + ''
115 pkgs.lib.strings.concatMapStrings optionalDevelopInstall developInstalls
136 '' + pkgs.lib.strings.concatMapStrings optionalBinDeps [ "rhodecode-vcsserver" ] + ''
116 + ''
117 '';
137 '';
118
138
119 })
139 })
General Comments 0
You need to be logged in to leave comments. Login now