Show More
@@ -1,228 +1,250 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 |
|
3 | # This shall be as lean as possible, just producing the Enterprise | |
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 | { pkgs ? (import <nixpkgs> {}) |
|
7 | args@ | |
8 |
|
|
8 | { pythonPackages ? "python27Packages" | |
9 | , pythonExternalOverrides ? self: super: {} |
|
9 | , pythonExternalOverrides ? self: super: {} | |
10 | , doCheck ? true |
|
10 | , doCheck ? true | |
|
11 | , ... | |||
11 | }: |
|
12 | }: | |
12 |
|
13 | |||
13 | let |
|
14 | let | |
14 | inherit (pkgs.lib) fix extends; |
|
15 | ||
|
16 | # Use nixpkgs from args or import them. We use this indirect approach | |||
|
17 | # through args to be able to use the name `pkgs` for our customized packages. | |||
|
18 | # Otherwise we will end up with an infinite recursion. | |||
|
19 | nixpkgs = args.pkgs or (import <nixpkgs> { }); | |||
|
20 | ||||
|
21 | # johbo: Interim bridge which allows us to build with the upcoming | |||
|
22 | # nixos.16.09 branch (unstable at the moment of writing this note) and the | |||
|
23 | # current stable nixos-16.03. | |||
|
24 | backwardsCompatibleFetchgit = { ... }@args: | |||
|
25 | let | |||
|
26 | origSources = nixpkgs.fetchgit args; | |||
|
27 | in | |||
|
28 | nixpkgs.lib.overrideDerivation origSources (oldAttrs: { | |||
|
29 | NIX_PREFETCH_GIT_CHECKOUT_HOOK = '' | |||
|
30 | find $out -name '.git*' -print0 | xargs -0 rm -rf | |||
|
31 | ''; | |||
|
32 | }); | |||
|
33 | ||||
|
34 | # Create a customized version of nixpkgs which should be used throughout the | |||
|
35 | # rest of this file. | |||
|
36 | pkgs = nixpkgs.overridePackages (self: super: { | |||
|
37 | fetchgit = backwardsCompatibleFetchgit; | |||
|
38 | }); | |||
|
39 | ||||
|
40 | # Evaluates to the last segment of a file system path. | |||
|
41 | basename = path: with pkgs.lib; last (splitString "/" path); | |||
|
42 | ||||
|
43 | # source code filter used as arugment to builtins.filterSource. | |||
|
44 | src-filter = path: type: with pkgs.lib; | |||
|
45 | let | |||
|
46 | ext = last (splitString "." path); | |||
|
47 | in | |||
|
48 | !builtins.elem (basename path) [ | |||
|
49 | ".git" ".hg" "__pycache__" ".eggs" | |||
|
50 | "bower_components" "node_modules" | |||
|
51 | "build" "data" "result" "tmp"] && | |||
|
52 | !builtins.elem ext ["egg-info" "pyc"] && | |||
|
53 | # TODO: johbo: This check is wrong, since "path" contains an absolute path, | |||
|
54 | # it would still be good to restore it since we want to ignore "result-*". | |||
|
55 | !hasPrefix "result" path; | |||
15 |
|
56 | |||
16 | basePythonPackages = with builtins; if isAttrs pythonPackages |
|
57 | basePythonPackages = with builtins; if isAttrs pythonPackages | |
17 | then pythonPackages |
|
58 | then pythonPackages | |
18 | else getAttr pythonPackages pkgs; |
|
59 | else getAttr pythonPackages pkgs; | |
19 |
|
60 | |||
20 | buildBowerComponents = |
|
61 | buildBowerComponents = | |
21 | pkgs.buildBowerComponents or |
|
62 | pkgs.buildBowerComponents or | |
22 | (import ./pkgs/backport-16.03-build-bower-components.nix { inherit pkgs; }); |
|
63 | (import ./pkgs/backport-16.03-build-bower-components.nix { inherit pkgs; }); | |
23 |
|
64 | |||
24 | elem = builtins.elem; |
|
|||
25 | basename = path: with pkgs.lib; last (splitString "/" path); |
|
|||
26 | startsWith = prefix: full: let |
|
|||
27 | actualPrefix = builtins.substring 0 (builtins.stringLength prefix) full; |
|
|||
28 | in actualPrefix == prefix; |
|
|||
29 |
|
||||
30 | src-filter = path: type: with pkgs.lib; |
|
|||
31 | let |
|
|||
32 | ext = last (splitString "." path); |
|
|||
33 | in |
|
|||
34 | !elem (basename path) [ |
|
|||
35 | ".git" ".hg" "__pycache__" ".eggs" |
|
|||
36 | "bower_components" "node_modules" |
|
|||
37 | "build" "data" "result" "tmp"] && |
|
|||
38 | !elem ext ["egg-info" "pyc"] && |
|
|||
39 | # TODO: johbo: This check is wrong, since "path" contains an absolute path, |
|
|||
40 | # it would still be good to restore it since we want to ignore "result-*". |
|
|||
41 | !startsWith "result" path; |
|
|||
42 |
|
||||
43 | sources = pkgs.config.rc.sources or {}; |
|
65 | sources = pkgs.config.rc.sources or {}; | |
44 | version = builtins.readFile ./rhodecode/VERSION; |
|
66 | version = builtins.readFile ./rhodecode/VERSION; | |
45 | rhodecode-enterprise-ce-src = builtins.filterSource src-filter ./.; |
|
67 | rhodecode-enterprise-ce-src = builtins.filterSource src-filter ./.; | |
46 |
|
68 | |||
47 | nodeEnv = import ./pkgs/node-default.nix { |
|
69 | nodeEnv = import ./pkgs/node-default.nix { | |
48 | inherit pkgs; |
|
70 | inherit pkgs; | |
49 | }; |
|
71 | }; | |
50 | nodeDependencies = nodeEnv.shell.nodeDependencies; |
|
72 | nodeDependencies = nodeEnv.shell.nodeDependencies; | |
51 |
|
73 | |||
52 | bowerComponents = buildBowerComponents { |
|
74 | bowerComponents = buildBowerComponents { | |
53 | name = "enterprise-ce-${version}"; |
|
75 | name = "enterprise-ce-${version}"; | |
54 | generated = ./pkgs/bower-packages.nix; |
|
76 | generated = ./pkgs/bower-packages.nix; | |
55 | src = rhodecode-enterprise-ce-src; |
|
77 | src = rhodecode-enterprise-ce-src; | |
56 | }; |
|
78 | }; | |
57 |
|
79 | |||
58 | pythonGeneratedPackages = self: basePythonPackages.override (a: { |
|
80 | pythonGeneratedPackages = self: basePythonPackages.override (a: { | |
59 | inherit self; |
|
81 | inherit self; | |
60 | }) |
|
82 | }) | |
61 | // (scopedImport { |
|
83 | // (scopedImport { | |
62 | self = self; |
|
84 | self = self; | |
63 | super = basePythonPackages; |
|
85 | super = basePythonPackages; | |
64 | inherit pkgs; |
|
86 | inherit pkgs; | |
65 | inherit (pkgs) fetchurl fetchgit; |
|
87 | inherit (pkgs) fetchurl fetchgit; | |
66 | } ./pkgs/python-packages.nix); |
|
88 | } ./pkgs/python-packages.nix); | |
67 |
|
89 | |||
68 | pythonOverrides = import ./pkgs/python-packages-overrides.nix { |
|
90 | pythonOverrides = import ./pkgs/python-packages-overrides.nix { | |
69 | inherit |
|
91 | inherit | |
70 | basePythonPackages |
|
92 | basePythonPackages | |
71 | pkgs; |
|
93 | pkgs; | |
72 | }; |
|
94 | }; | |
73 |
|
95 | |||
74 | pythonLocalOverrides = self: super: { |
|
96 | pythonLocalOverrides = self: super: { | |
75 | rhodecode-enterprise-ce = |
|
97 | rhodecode-enterprise-ce = | |
76 | let |
|
98 | let | |
77 | linkNodeAndBowerPackages = '' |
|
99 | linkNodeAndBowerPackages = '' | |
78 | echo "Export RhodeCode CE path" |
|
100 | echo "Export RhodeCode CE path" | |
79 | export RHODECODE_CE_PATH=${rhodecode-enterprise-ce-src} |
|
101 | export RHODECODE_CE_PATH=${rhodecode-enterprise-ce-src} | |
80 | echo "Link node packages" |
|
102 | echo "Link node packages" | |
81 | rm -fr node_modules |
|
103 | rm -fr node_modules | |
82 | mkdir node_modules |
|
104 | mkdir node_modules | |
83 | # johbo: Linking individual packages allows us to run "npm install" |
|
105 | # johbo: Linking individual packages allows us to run "npm install" | |
84 | # inside of a shell to try things out. Re-entering the shell will |
|
106 | # inside of a shell to try things out. Re-entering the shell will | |
85 | # restore a clean environment. |
|
107 | # restore a clean environment. | |
86 | ln -s ${nodeDependencies}/lib/node_modules/* node_modules/ |
|
108 | ln -s ${nodeDependencies}/lib/node_modules/* node_modules/ | |
87 |
|
109 | |||
88 | echo "DONE: Link node packages" |
|
110 | echo "DONE: Link node packages" | |
89 |
|
111 | |||
90 | echo "Link bower packages" |
|
112 | echo "Link bower packages" | |
91 | rm -fr bower_components |
|
113 | rm -fr bower_components | |
92 | mkdir bower_components |
|
114 | mkdir bower_components | |
93 |
|
115 | |||
94 | ln -s ${bowerComponents}/bower_components/* bower_components/ |
|
116 | ln -s ${bowerComponents}/bower_components/* bower_components/ | |
95 | echo "DONE: Link bower packages" |
|
117 | echo "DONE: Link bower packages" | |
96 | ''; |
|
118 | ''; | |
97 | in super.rhodecode-enterprise-ce.override (attrs: { |
|
119 | in super.rhodecode-enterprise-ce.override (attrs: { | |
98 |
|
120 | |||
99 | inherit |
|
121 | inherit | |
100 | doCheck |
|
122 | doCheck | |
101 | version; |
|
123 | version; | |
102 | name = "rhodecode-enterprise-ce-${version}"; |
|
124 | name = "rhodecode-enterprise-ce-${version}"; | |
103 | releaseName = "RhodeCodeEnterpriseCE-${version}"; |
|
125 | releaseName = "RhodeCodeEnterpriseCE-${version}"; | |
104 | src = rhodecode-enterprise-ce-src; |
|
126 | src = rhodecode-enterprise-ce-src; | |
105 |
|
127 | |||
106 | buildInputs = |
|
128 | buildInputs = | |
107 | attrs.buildInputs ++ |
|
129 | attrs.buildInputs ++ | |
108 | (with self; [ |
|
130 | (with self; [ | |
109 | pkgs.nodePackages.bower |
|
131 | pkgs.nodePackages.bower | |
110 | pkgs.nodePackages.grunt-cli |
|
132 | pkgs.nodePackages.grunt-cli | |
111 | pkgs.subversion |
|
133 | pkgs.subversion | |
112 | pytest-catchlog |
|
134 | pytest-catchlog | |
113 | rhodecode-testdata |
|
135 | rhodecode-testdata | |
114 | ]); |
|
136 | ]); | |
115 |
|
137 | |||
116 | propagatedBuildInputs = attrs.propagatedBuildInputs ++ (with self; [ |
|
138 | propagatedBuildInputs = attrs.propagatedBuildInputs ++ (with self; [ | |
117 | rhodecode-tools |
|
139 | rhodecode-tools | |
118 | ]); |
|
140 | ]); | |
119 |
|
141 | |||
120 | # TODO: johbo: Make a nicer way to expose the parts. Maybe |
|
142 | # TODO: johbo: Make a nicer way to expose the parts. Maybe | |
121 | # pkgs/default.nix? |
|
143 | # pkgs/default.nix? | |
122 | passthru = { |
|
144 | passthru = { | |
123 | inherit |
|
145 | inherit | |
124 | bowerComponents |
|
146 | bowerComponents | |
125 | linkNodeAndBowerPackages |
|
147 | linkNodeAndBowerPackages | |
126 | myPythonPackagesUnfix |
|
148 | myPythonPackagesUnfix | |
127 | pythonLocalOverrides; |
|
149 | pythonLocalOverrides; | |
128 | pythonPackages = self; |
|
150 | pythonPackages = self; | |
129 | }; |
|
151 | }; | |
130 |
|
152 | |||
131 | LC_ALL = "en_US.UTF-8"; |
|
153 | LC_ALL = "en_US.UTF-8"; | |
132 | LOCALE_ARCHIVE = |
|
154 | LOCALE_ARCHIVE = | |
133 | if pkgs.stdenv ? glibc |
|
155 | if pkgs.stdenv ? glibc | |
134 | then "${pkgs.glibcLocales}/lib/locale/locale-archive" |
|
156 | then "${pkgs.glibcLocales}/lib/locale/locale-archive" | |
135 | else ""; |
|
157 | else ""; | |
136 |
|
158 | |||
137 | # Somewhat snappier setup of the development environment |
|
159 | # Somewhat snappier setup of the development environment | |
138 | # TODO: move into shell.nix |
|
160 | # TODO: move into shell.nix | |
139 | # TODO: think of supporting a stable path again, so that multiple shells |
|
161 | # TODO: think of supporting a stable path again, so that multiple shells | |
140 | # can share it. |
|
162 | # can share it. | |
141 | shellHook = '' |
|
163 | shellHook = '' | |
142 | tmp_path=$(mktemp -d) |
|
164 | tmp_path=$(mktemp -d) | |
143 | export PATH="$tmp_path/bin:$PATH" |
|
165 | export PATH="$tmp_path/bin:$PATH" | |
144 | export PYTHONPATH="$tmp_path/${self.python.sitePackages}:$PYTHONPATH" |
|
166 | export PYTHONPATH="$tmp_path/${self.python.sitePackages}:$PYTHONPATH" | |
145 | mkdir -p $tmp_path/${self.python.sitePackages} |
|
167 | mkdir -p $tmp_path/${self.python.sitePackages} | |
146 | python setup.py develop --prefix $tmp_path --allow-hosts "" |
|
168 | python setup.py develop --prefix $tmp_path --allow-hosts "" | |
147 | '' + linkNodeAndBowerPackages; |
|
169 | '' + linkNodeAndBowerPackages; | |
148 |
|
170 | |||
149 | preCheck = '' |
|
171 | preCheck = '' | |
150 | export PATH="$out/bin:$PATH" |
|
172 | export PATH="$out/bin:$PATH" | |
151 | ''; |
|
173 | ''; | |
152 |
|
174 | |||
153 | postCheck = '' |
|
175 | postCheck = '' | |
154 | rm -rf $out/lib/${self.python.libPrefix}/site-packages/pytest_pylons |
|
176 | rm -rf $out/lib/${self.python.libPrefix}/site-packages/pytest_pylons | |
155 | rm -rf $out/lib/${self.python.libPrefix}/site-packages/rhodecode/tests |
|
177 | rm -rf $out/lib/${self.python.libPrefix}/site-packages/rhodecode/tests | |
156 | ''; |
|
178 | ''; | |
157 |
|
179 | |||
158 | preBuild = linkNodeAndBowerPackages + '' |
|
180 | preBuild = linkNodeAndBowerPackages + '' | |
159 | grunt |
|
181 | grunt | |
160 | rm -fr node_modules |
|
182 | rm -fr node_modules | |
161 | ''; |
|
183 | ''; | |
162 |
|
184 | |||
163 | postInstall = '' |
|
185 | postInstall = '' | |
164 | # python based programs need to be wrapped |
|
186 | # python based programs need to be wrapped | |
165 | ln -s ${self.supervisor}/bin/supervisor* $out/bin/ |
|
187 | ln -s ${self.supervisor}/bin/supervisor* $out/bin/ | |
166 | ln -s ${self.gunicorn}/bin/gunicorn $out/bin/ |
|
188 | ln -s ${self.gunicorn}/bin/gunicorn $out/bin/ | |
167 | ln -s ${self.PasteScript}/bin/paster $out/bin/ |
|
189 | ln -s ${self.PasteScript}/bin/paster $out/bin/ | |
168 | ln -s ${self.channelstream}/bin/channelstream $out/bin/ |
|
190 | ln -s ${self.channelstream}/bin/channelstream $out/bin/ | |
169 | ln -s ${self.pyramid}/bin/* $out/bin/ #*/ |
|
191 | ln -s ${self.pyramid}/bin/* $out/bin/ #*/ | |
170 |
|
192 | |||
171 | # rhodecode-tools |
|
193 | # rhodecode-tools | |
172 | # TODO: johbo: re-think this. Do the tools import anything from enterprise? |
|
194 | # TODO: johbo: re-think this. Do the tools import anything from enterprise? | |
173 | ln -s ${self.rhodecode-tools}/bin/rhodecode-* $out/bin/ |
|
195 | ln -s ${self.rhodecode-tools}/bin/rhodecode-* $out/bin/ | |
174 |
|
196 | |||
175 | # note that condition should be restricted when adding further tools |
|
197 | # note that condition should be restricted when adding further tools | |
176 | for file in $out/bin/*; do #*/ |
|
198 | for file in $out/bin/*; do #*/ | |
177 | wrapProgram $file \ |
|
199 | wrapProgram $file \ | |
178 | --prefix PYTHONPATH : $PYTHONPATH \ |
|
200 | --prefix PYTHONPATH : $PYTHONPATH \ | |
179 | --prefix PATH : $PATH \ |
|
201 | --prefix PATH : $PATH \ | |
180 | --set PYTHONHASHSEED random |
|
202 | --set PYTHONHASHSEED random | |
181 | done |
|
203 | done | |
182 |
|
204 | |||
183 | mkdir $out/etc |
|
205 | mkdir $out/etc | |
184 | cp configs/production.ini $out/etc |
|
206 | cp configs/production.ini $out/etc | |
185 |
|
207 | |||
186 | echo "Writing meta information for rccontrol to nix-support/rccontrol" |
|
208 | echo "Writing meta information for rccontrol to nix-support/rccontrol" | |
187 | mkdir -p $out/nix-support/rccontrol |
|
209 | mkdir -p $out/nix-support/rccontrol | |
188 | cp -v rhodecode/VERSION $out/nix-support/rccontrol/version |
|
210 | cp -v rhodecode/VERSION $out/nix-support/rccontrol/version | |
189 | echo "DONE: Meta information for rccontrol written" |
|
211 | echo "DONE: Meta information for rccontrol written" | |
190 |
|
212 | |||
191 | # TODO: johbo: Make part of ac-tests |
|
213 | # TODO: johbo: Make part of ac-tests | |
192 | if [ ! -f rhodecode/public/js/scripts.js ]; then |
|
214 | if [ ! -f rhodecode/public/js/scripts.js ]; then | |
193 | echo "Missing scripts.js" |
|
215 | echo "Missing scripts.js" | |
194 | exit 1 |
|
216 | exit 1 | |
195 | fi |
|
217 | fi | |
196 | if [ ! -f rhodecode/public/css/style.css ]; then |
|
218 | if [ ! -f rhodecode/public/css/style.css ]; then | |
197 | echo "Missing style.css" |
|
219 | echo "Missing style.css" | |
198 | exit 1 |
|
220 | exit 1 | |
199 | fi |
|
221 | fi | |
200 | ''; |
|
222 | ''; | |
201 |
|
223 | |||
202 | }); |
|
224 | }); | |
203 |
|
225 | |||
204 | rhodecode-testdata = import "${rhodecode-testdata-src}/default.nix" { |
|
226 | rhodecode-testdata = import "${rhodecode-testdata-src}/default.nix" { | |
205 | inherit |
|
227 | inherit | |
206 | doCheck |
|
228 | doCheck | |
207 | pkgs |
|
229 | pkgs | |
208 | pythonPackages; |
|
230 | pythonPackages; | |
209 | }; |
|
231 | }; | |
210 |
|
232 | |||
211 | }; |
|
233 | }; | |
212 |
|
234 | |||
213 | rhodecode-testdata-src = sources.rhodecode-testdata or ( |
|
235 | rhodecode-testdata-src = sources.rhodecode-testdata or ( | |
214 | pkgs.fetchhg { |
|
236 | pkgs.fetchhg { | |
215 | url = "https://code.rhodecode.com/upstream/rc_testdata"; |
|
237 | url = "https://code.rhodecode.com/upstream/rc_testdata"; | |
216 | rev = "v0.8.0"; |
|
238 | rev = "v0.8.0"; | |
217 | sha256 = "0hy1ba134rq2f9si85yx7j4qhc9ky0hjzdk553s3q026i7km809m"; |
|
239 | sha256 = "0hy1ba134rq2f9si85yx7j4qhc9ky0hjzdk553s3q026i7km809m"; | |
218 | }); |
|
240 | }); | |
219 |
|
241 | |||
220 | # Apply all overrides and fix the final package set |
|
242 | # Apply all overrides and fix the final package set | |
221 | myPythonPackagesUnfix = |
|
243 | myPythonPackagesUnfix = with pkgs.lib; | |
222 | (extends pythonExternalOverrides |
|
244 | (extends pythonExternalOverrides | |
223 | (extends pythonLocalOverrides |
|
245 | (extends pythonLocalOverrides | |
224 | (extends pythonOverrides |
|
246 | (extends pythonOverrides | |
225 | pythonGeneratedPackages))); |
|
247 | pythonGeneratedPackages))); | |
226 | myPythonPackages = (fix myPythonPackagesUnfix); |
|
248 | myPythonPackages = (pkgs.lib.fix myPythonPackagesUnfix); | |
227 |
|
249 | |||
228 | in myPythonPackages.rhodecode-enterprise-ce |
|
250 | in myPythonPackages.rhodecode-enterprise-ce |
@@ -1,296 +1,283 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, basePythonPackages }: |
|
7 | { pkgs, basePythonPackages }: | |
8 |
|
8 | |||
9 | let |
|
9 | let | |
10 | sed = "sed -i"; |
|
10 | sed = "sed -i"; | |
11 | localLicenses = { |
|
11 | localLicenses = { | |
12 | repoze = { |
|
12 | repoze = { | |
13 | fullName = "Repoze License"; |
|
13 | fullName = "Repoze License"; | |
14 | url = http://www.repoze.org/LICENSE.txt; |
|
14 | url = http://www.repoze.org/LICENSE.txt; | |
15 | }; |
|
15 | }; | |
16 | }; |
|
16 | }; | |
17 |
|
17 | |||
18 | # johbo: Interim bridge which allows us to build with the upcoming |
|
|||
19 | # nixos.16.09 branch (unstable at the moment of writing this note) and the |
|
|||
20 | # current stable nixos-16.03. |
|
|||
21 | backwardsCompatibleFetchgit = { ... }@args: |
|
|||
22 | let |
|
|||
23 | origSources = pkgs.fetchgit args; |
|
|||
24 | in |
|
|||
25 | pkgs.lib.overrideDerivation origSources (oldAttrs: { |
|
|||
26 | NIX_PREFETCH_GIT_CHECKOUT_HOOK = '' |
|
|||
27 | find $out -name '.git*' -print0 | xargs -0 rm -rf |
|
|||
28 | ''; |
|
|||
29 | }); |
|
|||
30 |
|
||||
31 | in |
|
18 | in | |
32 |
|
19 | |||
33 | self: super: { |
|
20 | self: super: { | |
34 |
|
21 | |||
35 | appenlight-client = super.appenlight-client.override (attrs: { |
|
22 | appenlight-client = super.appenlight-client.override (attrs: { | |
36 | meta = { |
|
23 | meta = { | |
37 | license = [ pkgs.lib.licenses.bsdOriginal ]; |
|
24 | license = [ pkgs.lib.licenses.bsdOriginal ]; | |
38 | }; |
|
25 | }; | |
39 | }); |
|
26 | }); | |
40 |
|
27 | |||
41 | future = super.future.override (attrs: { |
|
28 | future = super.future.override (attrs: { | |
42 | meta = { |
|
29 | meta = { | |
43 | license = [ pkgs.lib.licenses.mit ]; |
|
30 | license = [ pkgs.lib.licenses.mit ]; | |
44 | }; |
|
31 | }; | |
45 | }); |
|
32 | }); | |
46 |
|
33 | |||
47 | gnureadline = super.gnureadline.override (attrs: { |
|
34 | gnureadline = super.gnureadline.override (attrs: { | |
48 | buildInputs = attrs.buildInputs ++ [ |
|
35 | buildInputs = attrs.buildInputs ++ [ | |
49 | pkgs.ncurses |
|
36 | pkgs.ncurses | |
50 | ]; |
|
37 | ]; | |
51 | patchPhase = '' |
|
38 | patchPhase = '' | |
52 | substituteInPlace setup.py --replace "/bin/bash" "${pkgs.bash}/bin/bash" |
|
39 | substituteInPlace setup.py --replace "/bin/bash" "${pkgs.bash}/bin/bash" | |
53 | ''; |
|
40 | ''; | |
54 | }); |
|
41 | }); | |
55 |
|
42 | |||
56 | gunicorn = super.gunicorn.override (attrs: { |
|
43 | gunicorn = super.gunicorn.override (attrs: { | |
57 | propagatedBuildInputs = attrs.propagatedBuildInputs ++ [ |
|
44 | propagatedBuildInputs = attrs.propagatedBuildInputs ++ [ | |
58 | # johbo: futures is needed as long as we are on Python 2, otherwise |
|
45 | # johbo: futures is needed as long as we are on Python 2, otherwise | |
59 | # gunicorn explodes if used with multiple threads per worker. |
|
46 | # gunicorn explodes if used with multiple threads per worker. | |
60 | self.futures |
|
47 | self.futures | |
61 | ]; |
|
48 | ]; | |
62 | }); |
|
49 | }); | |
63 |
|
50 | |||
64 | ipython = super.ipython.override (attrs: { |
|
51 | ipython = super.ipython.override (attrs: { | |
65 | propagatedBuildInputs = attrs.propagatedBuildInputs ++ [ |
|
52 | propagatedBuildInputs = attrs.propagatedBuildInputs ++ [ | |
66 | self.gnureadline |
|
53 | self.gnureadline | |
67 | ]; |
|
54 | ]; | |
68 | }); |
|
55 | }); | |
69 |
|
56 | |||
70 | kombu = super.kombu.override (attrs: { |
|
57 | kombu = super.kombu.override (attrs: { | |
71 | # The current version of kombu needs some patching to work with the |
|
58 | # The current version of kombu needs some patching to work with the | |
72 | # other libs. Should be removed once we update celery and kombu. |
|
59 | # other libs. Should be removed once we update celery and kombu. | |
73 | patches = [ |
|
60 | patches = [ | |
74 | ./patch-kombu-py-2-7-11.diff |
|
61 | ./patch-kombu-py-2-7-11.diff | |
75 | ./patch-kombu-msgpack.diff |
|
62 | ./patch-kombu-msgpack.diff | |
76 | ]; |
|
63 | ]; | |
77 | }); |
|
64 | }); | |
78 |
|
65 | |||
79 | lxml = super.lxml.override (attrs: { |
|
66 | lxml = super.lxml.override (attrs: { | |
80 | buildInputs = with self; [ |
|
67 | buildInputs = with self; [ | |
81 | pkgs.libxml2 |
|
68 | pkgs.libxml2 | |
82 | pkgs.libxslt |
|
69 | pkgs.libxslt | |
83 | ]; |
|
70 | ]; | |
84 | }); |
|
71 | }); | |
85 |
|
72 | |||
86 | MySQL-python = super.MySQL-python.override (attrs: { |
|
73 | MySQL-python = super.MySQL-python.override (attrs: { | |
87 | buildInputs = attrs.buildInputs ++ [ |
|
74 | buildInputs = attrs.buildInputs ++ [ | |
88 | pkgs.openssl |
|
75 | pkgs.openssl | |
89 | ]; |
|
76 | ]; | |
90 | propagatedBuildInputs = attrs.propagatedBuildInputs ++ [ |
|
77 | propagatedBuildInputs = attrs.propagatedBuildInputs ++ [ | |
91 | pkgs.mysql.lib |
|
78 | pkgs.mysql.lib | |
92 | pkgs.zlib |
|
79 | pkgs.zlib | |
93 | ]; |
|
80 | ]; | |
94 | }); |
|
81 | }); | |
95 |
|
82 | |||
96 | psutil = super.psutil.override (attrs: { |
|
83 | psutil = super.psutil.override (attrs: { | |
97 | buildInputs = attrs.buildInputs ++ |
|
84 | buildInputs = attrs.buildInputs ++ | |
98 | pkgs.lib.optional pkgs.stdenv.isDarwin pkgs.darwin.IOKit; |
|
85 | pkgs.lib.optional pkgs.stdenv.isDarwin pkgs.darwin.IOKit; | |
99 | }); |
|
86 | }); | |
100 |
|
87 | |||
101 | psycopg2 = super.psycopg2.override (attrs: { |
|
88 | psycopg2 = super.psycopg2.override (attrs: { | |
102 | buildInputs = attrs.buildInputs ++ |
|
89 | buildInputs = attrs.buildInputs ++ | |
103 | pkgs.lib.optional pkgs.stdenv.isDarwin pkgs.openssl; |
|
90 | pkgs.lib.optional pkgs.stdenv.isDarwin pkgs.openssl; | |
104 | propagatedBuildInputs = attrs.propagatedBuildInputs ++ [ |
|
91 | propagatedBuildInputs = attrs.propagatedBuildInputs ++ [ | |
105 | pkgs.postgresql |
|
92 | pkgs.postgresql | |
106 | ]; |
|
93 | ]; | |
107 | meta = { |
|
94 | meta = { | |
108 | license = pkgs.lib.licenses.lgpl3Plus; |
|
95 | license = pkgs.lib.licenses.lgpl3Plus; | |
109 | }; |
|
96 | }; | |
110 | }); |
|
97 | }); | |
111 |
|
98 | |||
112 | py-gfm = super.py-gfm.override { |
|
99 | py-gfm = super.py-gfm.override { | |
113 |
src = |
|
100 | src = pkgs.fetchgit { | |
114 | url = "https://code.rhodecode.com/upstream/py-gfm"; |
|
101 | url = "https://code.rhodecode.com/upstream/py-gfm"; | |
115 | rev = "0d66a19bc16e3d49de273c0f797d4e4781e8c0f2"; |
|
102 | rev = "0d66a19bc16e3d49de273c0f797d4e4781e8c0f2"; | |
116 | sha256 = "0ryp74jyihd3ckszq31bml5jr3bciimhfp7va7kw6ld92930ksv3"; |
|
103 | sha256 = "0ryp74jyihd3ckszq31bml5jr3bciimhfp7va7kw6ld92930ksv3"; | |
117 | }; |
|
104 | }; | |
118 | }; |
|
105 | }; | |
119 |
|
106 | |||
120 | pycurl = super.pycurl.override (attrs: { |
|
107 | pycurl = super.pycurl.override (attrs: { | |
121 | propagatedBuildInputs = attrs.propagatedBuildInputs ++ [ |
|
108 | propagatedBuildInputs = attrs.propagatedBuildInputs ++ [ | |
122 | pkgs.curl |
|
109 | pkgs.curl | |
123 | pkgs.openssl |
|
110 | pkgs.openssl | |
124 | ]; |
|
111 | ]; | |
125 | preConfigure = '' |
|
112 | preConfigure = '' | |
126 | substituteInPlace setup.py --replace '--static-libs' '--libs' |
|
113 | substituteInPlace setup.py --replace '--static-libs' '--libs' | |
127 | export PYCURL_SSL_LIBRARY=openssl |
|
114 | export PYCURL_SSL_LIBRARY=openssl | |
128 | ''; |
|
115 | ''; | |
129 | meta = { |
|
116 | meta = { | |
130 | # TODO: It is LGPL and MIT |
|
117 | # TODO: It is LGPL and MIT | |
131 | license = pkgs.lib.licenses.mit; |
|
118 | license = pkgs.lib.licenses.mit; | |
132 | }; |
|
119 | }; | |
133 | }); |
|
120 | }); | |
134 |
|
121 | |||
135 | Pylons = super.Pylons.override (attrs: { |
|
122 | Pylons = super.Pylons.override (attrs: { | |
136 | name = "Pylons-1.0.1-patch1"; |
|
123 | name = "Pylons-1.0.1-patch1"; | |
137 |
src = |
|
124 | src = pkgs.fetchgit { | |
138 | url = "https://code.rhodecode.com/upstream/pylons"; |
|
125 | url = "https://code.rhodecode.com/upstream/pylons"; | |
139 | rev = "707354ee4261b9c10450404fc9852ccea4fd667d"; |
|
126 | rev = "707354ee4261b9c10450404fc9852ccea4fd667d"; | |
140 | sha256 = "b2763274c2780523a335f83a1df65be22ebe4ff413a7bc9e9288d23c1f62032e"; |
|
127 | sha256 = "b2763274c2780523a335f83a1df65be22ebe4ff413a7bc9e9288d23c1f62032e"; | |
141 | }; |
|
128 | }; | |
142 | }); |
|
129 | }); | |
143 |
|
130 | |||
144 | pyramid = super.pyramid.override (attrs: { |
|
131 | pyramid = super.pyramid.override (attrs: { | |
145 | postFixup = '' |
|
132 | postFixup = '' | |
146 | wrapPythonPrograms |
|
133 | wrapPythonPrograms | |
147 | # TODO: johbo: "wrapPython" adds this magic line which |
|
134 | # TODO: johbo: "wrapPython" adds this magic line which | |
148 | # confuses pserve. |
|
135 | # confuses pserve. | |
149 | ${sed} '/import sys; sys.argv/d' $out/bin/.pserve-wrapped |
|
136 | ${sed} '/import sys; sys.argv/d' $out/bin/.pserve-wrapped | |
150 | ''; |
|
137 | ''; | |
151 | meta = { |
|
138 | meta = { | |
152 | license = localLicenses.repoze; |
|
139 | license = localLicenses.repoze; | |
153 | }; |
|
140 | }; | |
154 | }); |
|
141 | }); | |
155 |
|
142 | |||
156 | pyramid-debugtoolbar = super.pyramid-debugtoolbar.override (attrs: { |
|
143 | pyramid-debugtoolbar = super.pyramid-debugtoolbar.override (attrs: { | |
157 | meta = { |
|
144 | meta = { | |
158 | license = [ pkgs.lib.licenses.bsdOriginal localLicenses.repoze ]; |
|
145 | license = [ pkgs.lib.licenses.bsdOriginal localLicenses.repoze ]; | |
159 | }; |
|
146 | }; | |
160 | }); |
|
147 | }); | |
161 |
|
148 | |||
162 | Pyro4 = super.Pyro4.override (attrs: { |
|
149 | Pyro4 = super.Pyro4.override (attrs: { | |
163 | # TODO: Was not able to generate this version, needs further |
|
150 | # TODO: Was not able to generate this version, needs further | |
164 | # investigation. |
|
151 | # investigation. | |
165 | name = "Pyro4-4.35"; |
|
152 | name = "Pyro4-4.35"; | |
166 | src = pkgs.fetchurl { |
|
153 | src = pkgs.fetchurl { | |
167 | url = "https://pypi.python.org/packages/source/P/Pyro4/Pyro4-4.35.src.tar.gz"; |
|
154 | url = "https://pypi.python.org/packages/source/P/Pyro4/Pyro4-4.35.src.tar.gz"; | |
168 | md5 = "cbe6cb855f086a0f092ca075005855f3"; |
|
155 | md5 = "cbe6cb855f086a0f092ca075005855f3"; | |
169 | }; |
|
156 | }; | |
170 | }); |
|
157 | }); | |
171 |
|
158 | |||
172 | pysqlite = super.pysqlite.override (attrs: { |
|
159 | pysqlite = super.pysqlite.override (attrs: { | |
173 | propagatedBuildInputs = [ |
|
160 | propagatedBuildInputs = [ | |
174 | pkgs.sqlite |
|
161 | pkgs.sqlite | |
175 | ]; |
|
162 | ]; | |
176 | meta = { |
|
163 | meta = { | |
177 | license = [ pkgs.lib.licenses.zlib pkgs.lib.licenses.libpng ]; |
|
164 | license = [ pkgs.lib.licenses.zlib pkgs.lib.licenses.libpng ]; | |
178 | }; |
|
165 | }; | |
179 | }); |
|
166 | }); | |
180 |
|
167 | |||
181 | pytest-runner = super.pytest-runner.override (attrs: { |
|
168 | pytest-runner = super.pytest-runner.override (attrs: { | |
182 | propagatedBuildInputs = [ |
|
169 | propagatedBuildInputs = [ | |
183 | self.setuptools-scm |
|
170 | self.setuptools-scm | |
184 | ]; |
|
171 | ]; | |
185 | }); |
|
172 | }); | |
186 |
|
173 | |||
187 | python-ldap = super.python-ldap.override (attrs: { |
|
174 | python-ldap = super.python-ldap.override (attrs: { | |
188 | propagatedBuildInputs = attrs.propagatedBuildInputs ++ [ |
|
175 | propagatedBuildInputs = attrs.propagatedBuildInputs ++ [ | |
189 | pkgs.cyrus_sasl |
|
176 | pkgs.cyrus_sasl | |
190 | pkgs.openldap |
|
177 | pkgs.openldap | |
191 | pkgs.openssl |
|
178 | pkgs.openssl | |
192 | ]; |
|
179 | ]; | |
193 | # TODO: johbo: Remove the "or" once we drop 16.03 support. |
|
180 | # TODO: johbo: Remove the "or" once we drop 16.03 support. | |
194 | NIX_CFLAGS_COMPILE = "-I${pkgs.cyrus_sasl.dev or pkgs.cyrus_sasl}/include/sasl"; |
|
181 | NIX_CFLAGS_COMPILE = "-I${pkgs.cyrus_sasl.dev or pkgs.cyrus_sasl}/include/sasl"; | |
195 | }); |
|
182 | }); | |
196 |
|
183 | |||
197 | python-pam = super.python-pam.override (attrs: |
|
184 | python-pam = super.python-pam.override (attrs: | |
198 | let |
|
185 | let | |
199 | includeLibPam = pkgs.stdenv.isLinux; |
|
186 | includeLibPam = pkgs.stdenv.isLinux; | |
200 | in { |
|
187 | in { | |
201 | # TODO: johbo: Move the option up into the default.nix, we should |
|
188 | # TODO: johbo: Move the option up into the default.nix, we should | |
202 | # include python-pam only on supported platforms. |
|
189 | # include python-pam only on supported platforms. | |
203 | propagatedBuildInputs = attrs.propagatedBuildInputs ++ |
|
190 | propagatedBuildInputs = attrs.propagatedBuildInputs ++ | |
204 | pkgs.lib.optional includeLibPam [ |
|
191 | pkgs.lib.optional includeLibPam [ | |
205 | pkgs.pam |
|
192 | pkgs.pam | |
206 | ]; |
|
193 | ]; | |
207 | # TODO: johbo: Check if this can be avoided, or transform into |
|
194 | # TODO: johbo: Check if this can be avoided, or transform into | |
208 | # a real patch |
|
195 | # a real patch | |
209 | patchPhase = pkgs.lib.optionals includeLibPam '' |
|
196 | patchPhase = pkgs.lib.optionals includeLibPam '' | |
210 | substituteInPlace pam.py \ |
|
197 | substituteInPlace pam.py \ | |
211 | --replace 'find_library("pam")' '"${pkgs.pam}/lib/libpam.so.0"' |
|
198 | --replace 'find_library("pam")' '"${pkgs.pam}/lib/libpam.so.0"' | |
212 | ''; |
|
199 | ''; | |
213 | }); |
|
200 | }); | |
214 |
|
201 | |||
215 | rhodecode-tools = super.rhodecode-tools.override (attrs: { |
|
202 | rhodecode-tools = super.rhodecode-tools.override (attrs: { | |
216 | patches = [ |
|
203 | patches = [ | |
217 | ./patch-rhodecode-tools-setup.diff |
|
204 | ./patch-rhodecode-tools-setup.diff | |
218 | ]; |
|
205 | ]; | |
219 | }); |
|
206 | }); | |
220 |
|
207 | |||
221 | URLObject = super.URLObject.override (attrs: { |
|
208 | URLObject = super.URLObject.override (attrs: { | |
222 | meta = { |
|
209 | meta = { | |
223 | license = { |
|
210 | license = { | |
224 | spdxId = "Unlicense"; |
|
211 | spdxId = "Unlicense"; | |
225 | fullName = "The Unlicense"; |
|
212 | fullName = "The Unlicense"; | |
226 | url = http://unlicense.org/; |
|
213 | url = http://unlicense.org/; | |
227 | }; |
|
214 | }; | |
228 | }; |
|
215 | }; | |
229 | }); |
|
216 | }); | |
230 |
|
217 | |||
231 | amqplib = super.amqplib.override (attrs: { |
|
218 | amqplib = super.amqplib.override (attrs: { | |
232 | meta = { |
|
219 | meta = { | |
233 | license = pkgs.lib.licenses.lgpl3; |
|
220 | license = pkgs.lib.licenses.lgpl3; | |
234 | }; |
|
221 | }; | |
235 | }); |
|
222 | }); | |
236 |
|
223 | |||
237 | docutils = super.docutils.override (attrs: { |
|
224 | docutils = super.docutils.override (attrs: { | |
238 | meta = { |
|
225 | meta = { | |
239 | license = pkgs.lib.licenses.bsd2; |
|
226 | license = pkgs.lib.licenses.bsd2; | |
240 | }; |
|
227 | }; | |
241 | }); |
|
228 | }); | |
242 |
|
229 | |||
243 | colander = super.colander.override (attrs: { |
|
230 | colander = super.colander.override (attrs: { | |
244 | meta = { |
|
231 | meta = { | |
245 | license = localLicenses.repoze; |
|
232 | license = localLicenses.repoze; | |
246 | }; |
|
233 | }; | |
247 | }); |
|
234 | }); | |
248 |
|
235 | |||
249 | pyramid-beaker = super.pyramid-beaker.override (attrs: { |
|
236 | pyramid-beaker = super.pyramid-beaker.override (attrs: { | |
250 | meta = { |
|
237 | meta = { | |
251 | license = localLicenses.repoze; |
|
238 | license = localLicenses.repoze; | |
252 | }; |
|
239 | }; | |
253 | }); |
|
240 | }); | |
254 |
|
241 | |||
255 | pyramid-mako = super.pyramid-mako.override (attrs: { |
|
242 | pyramid-mako = super.pyramid-mako.override (attrs: { | |
256 | meta = { |
|
243 | meta = { | |
257 | license = localLicenses.repoze; |
|
244 | license = localLicenses.repoze; | |
258 | }; |
|
245 | }; | |
259 | }); |
|
246 | }); | |
260 |
|
247 | |||
261 | repoze.lru = super.repoze.lru.override (attrs: { |
|
248 | repoze.lru = super.repoze.lru.override (attrs: { | |
262 | meta = { |
|
249 | meta = { | |
263 | license = localLicenses.repoze; |
|
250 | license = localLicenses.repoze; | |
264 | }; |
|
251 | }; | |
265 | }); |
|
252 | }); | |
266 |
|
253 | |||
267 | recaptcha-client = super.recaptcha-client.override (attrs: { |
|
254 | recaptcha-client = super.recaptcha-client.override (attrs: { | |
268 | meta = { |
|
255 | meta = { | |
269 | # TODO: It is MIT/X11 |
|
256 | # TODO: It is MIT/X11 | |
270 | license = pkgs.lib.licenses.mit; |
|
257 | license = pkgs.lib.licenses.mit; | |
271 | }; |
|
258 | }; | |
272 | }); |
|
259 | }); | |
273 |
|
260 | |||
274 | python-editor = super.python-editor.override (attrs: { |
|
261 | python-editor = super.python-editor.override (attrs: { | |
275 | meta = { |
|
262 | meta = { | |
276 | license = pkgs.lib.licenses.asl20; |
|
263 | license = pkgs.lib.licenses.asl20; | |
277 | }; |
|
264 | }; | |
278 | }); |
|
265 | }); | |
279 |
|
266 | |||
280 | translationstring = super.translationstring.override (attrs: { |
|
267 | translationstring = super.translationstring.override (attrs: { | |
281 | meta = { |
|
268 | meta = { | |
282 | license = localLicenses.repoze; |
|
269 | license = localLicenses.repoze; | |
283 | }; |
|
270 | }; | |
284 | }); |
|
271 | }); | |
285 |
|
272 | |||
286 | venusian = super.venusian.override (attrs: { |
|
273 | venusian = super.venusian.override (attrs: { | |
287 | meta = { |
|
274 | meta = { | |
288 | license = localLicenses.repoze; |
|
275 | license = localLicenses.repoze; | |
289 | }; |
|
276 | }; | |
290 | }); |
|
277 | }); | |
291 |
|
278 | |||
292 | # Avoid that setuptools is replaced, this leads to trouble |
|
279 | # Avoid that setuptools is replaced, this leads to trouble | |
293 | # with buildPythonPackage. |
|
280 | # with buildPythonPackage. | |
294 | setuptools = basePythonPackages.setuptools; |
|
281 | setuptools = basePythonPackages.setuptools; | |
295 |
|
282 | |||
296 | } |
|
283 | } |
General Comments 0
You need to be logged in to leave comments.
Login now