##// END OF EJS Templates
nix: further nix changes
marcink -
r976:cfd2a5fb python3
parent child Browse files
Show More
@@ -65,13 +65,19 b' let'
65 assert all isString (attrValues sourcesConfig);
65 assert all isString (attrValues sourcesConfig);
66 sourcesConfig;
66 sourcesConfig;
67
67
68 rhodecode-vcsserver-src = builtins.filterSource src-filter ./.;
68 version = builtins.readFile "${rhodecode-vcsserver-src}/vcsserver/VERSION";
69 version = builtins.readFile "${rhodecode-vcsserver-src}/vcsserver/VERSION";
69 rhodecode-vcsserver-src = builtins.filterSource src-filter ./.;
70
70
71 pythonLocalOverrides = self: super: {
71 pythonLocalOverrides = self: super: {
72 rhodecode-vcsserver =
72 rhodecode-vcsserver =
73 let
73 let
74 releaseName = "RhodeCodeVCSServer-${version}";
74 releaseName = "RhodeCodeVCSServer-${version}";
75 pythonWithEnv =
76 self.python.buildEnv.override {
77 extraLibs = [ ] ++ self.rhodecode-vcsserver.propagatedBuildInputs;
78 ignoreCollisions = true;
79 #--set PYTHONHASHSEED random TODO
80 };
75 in super.rhodecode-vcsserver.override (attrs: {
81 in super.rhodecode-vcsserver.override (attrs: {
76 inherit
82 inherit
77 doCheck
83 doCheck
@@ -107,6 +113,7 b' let'
107
113
108 # Add bin directory to path so that tests can find 'vcsserver'.
114 # Add bin directory to path so that tests can find 'vcsserver'.
109 preCheck = ''
115 preCheck = ''
116 echo "Expanding PATH with $out/bin directory"
110 export PATH="$out/bin:$PATH"
117 export PATH="$out/bin:$PATH"
111 '';
118 '';
112
119
@@ -142,25 +149,29 b' let'
142 mkdir -p $out/bin
149 mkdir -p $out/bin
143
150
144 # expose python
151 # expose python
145 ln -s ${pkgs.pythonWithSetuptools}/bin/python $out/bin/
152 ln -s ${pythonWithEnv}/bin/python $out/bin/
146
153
147 # required binaries from dependencies
154 # required binaries from dependencies
148 ln -s ${self.gunicorn}/bin/gunicorn $out/bin/
155 ln -s ${pythonWithEnv}/bin/gunicorn $out/bin/
149 ln -s ${self.pyramid}/bin/prequest $out/bin/
156 ln -s ${pythonWithEnv}/bin/prequest $out/bin/
150 ln -s ${self.pyramid}/bin/pserve $out/bin/
157 ln -s ${pythonWithEnv}/bin/pserve $out/bin/
151
158
152 # Symlink version control utilities
159 # Symlink version control utilities
153 # We ensure that always the correct version is available as a symlink.
160 # We ensure that always the correct version is available as a symlink.
154 # So that users calling them via the profile path will always use the
161 # So that users calling them via the profile path will always use the
155 # correct version. Wrapping is required so those can "import"
162 # correct version. Wrapping is required so those can "import"
156 # vcsserver python hooks.
163 # vcsserver python hooks.
157
158 ln -s ${pkgs.git}/bin/git $out/bin
164 ln -s ${pkgs.git}/bin/git $out/bin
159 ln -s ${self.mercurial}/bin/hg $out/bin
165 ln -s ${self.mercurial}/bin/hg $out/bin
160 ln -s ${pkgs.subversion}/bin/svn* $out/bin
166 ln -s ${pkgs.subversion}/bin/svn* $out/bin
161
167
162 echo "DONE: created symlinks into $out/bin"
168 echo "[DONE ]: created symlinks into $out/bin"
163 DEPS="$out/bin/*"
169 DEPS="$out/bin/hg \
170 $out/bin/git \
171 $out/bin/svn \
172 $out/bin/svnserve \
173 $out/bin/svnadmin
174 "
164
175
165 # wrap only dependency scripts, they require to have full PYTHONPATH set
176 # wrap only dependency scripts, they require to have full PYTHONPATH set
166 # to be able to import all packages
177 # to be able to import all packages
@@ -168,12 +179,13 b' let'
168 do
179 do
169 wrapProgram $file \
180 wrapProgram $file \
170 --prefix PATH : $PATH \
181 --prefix PATH : $PATH \
171 --prefix PYTHONPATH : $PYTHONPATH \
182 --prefix PYTHONPATH : $PYTHONPATH
172 --set PYTHONHASHSEED random
173 done
183 done
174
184
175 echo "DONE: vcsserver binary wrapping"
185 echo "[DONE ]: vcsserver binary wrapping"
176
186
187 # expose sources of vcsserver
188 ln -s $out $out/etc/rhodecode_vcsserver_source
177 '';
189 '';
178
190
179 });
191 });
@@ -1,9 +1,5 b''
1 self: super: {
1 self: super: {
2
2
3 pythonWithSetuptools = self.python.withPackages(ps: with ps; [
4 setuptools
5 ]);
6
7 # change GIT version
3 # change GIT version
8 # latest supported are in: https://github.com/NixOS/nixpkgs/tree/master/pkgs/applications/version-management/git-and-tools/git
4 # latest supported are in: https://github.com/NixOS/nixpkgs/tree/master/pkgs/applications/version-management/git-and-tools/git
9 git = super.lib.overrideDerivation super.git (oldAttrs: {
5 git = super.lib.overrideDerivation super.git (oldAttrs: {
General Comments 0
You need to be logged in to leave comments. Login now