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