diff --git a/default.nix b/default.nix --- a/default.nix +++ b/default.nix @@ -65,13 +65,19 @@ let assert all isString (attrValues sourcesConfig); sourcesConfig; + rhodecode-vcsserver-src = builtins.filterSource src-filter ./.; version = builtins.readFile "${rhodecode-vcsserver-src}/vcsserver/VERSION"; - rhodecode-vcsserver-src = builtins.filterSource src-filter ./.; pythonLocalOverrides = self: super: { rhodecode-vcsserver = let releaseName = "RhodeCodeVCSServer-${version}"; + pythonWithEnv = + self.python.buildEnv.override { + extraLibs = [ ] ++ self.rhodecode-vcsserver.propagatedBuildInputs; + ignoreCollisions = true; + #--set PYTHONHASHSEED random TODO + }; in super.rhodecode-vcsserver.override (attrs: { inherit doCheck @@ -107,6 +113,7 @@ let # Add bin directory to path so that tests can find 'vcsserver'. preCheck = '' + echo "Expanding PATH with $out/bin directory" export PATH="$out/bin:$PATH" ''; @@ -142,25 +149,29 @@ let mkdir -p $out/bin # expose python - ln -s ${pkgs.pythonWithSetuptools}/bin/python $out/bin/ + ln -s ${pythonWithEnv}/bin/python $out/bin/ # required binaries from dependencies - ln -s ${self.gunicorn}/bin/gunicorn $out/bin/ - ln -s ${self.pyramid}/bin/prequest $out/bin/ - ln -s ${self.pyramid}/bin/pserve $out/bin/ + ln -s ${pythonWithEnv}/bin/gunicorn $out/bin/ + ln -s ${pythonWithEnv}/bin/prequest $out/bin/ + ln -s ${pythonWithEnv}/bin/pserve $out/bin/ # Symlink version control utilities # We ensure that always the correct version is available as a symlink. # So that users calling them via the profile path will always use the # correct version. Wrapping is required so those can "import" # vcsserver python hooks. - ln -s ${pkgs.git}/bin/git $out/bin ln -s ${self.mercurial}/bin/hg $out/bin ln -s ${pkgs.subversion}/bin/svn* $out/bin - echo "DONE: created symlinks into $out/bin" - DEPS="$out/bin/*" + echo "[DONE ]: created symlinks into $out/bin" + DEPS="$out/bin/hg \ + $out/bin/git \ + $out/bin/svn \ + $out/bin/svnserve \ + $out/bin/svnadmin + " # wrap only dependency scripts, they require to have full PYTHONPATH set # to be able to import all packages @@ -168,12 +179,13 @@ let do wrapProgram $file \ --prefix PATH : $PATH \ - --prefix PYTHONPATH : $PYTHONPATH \ - --set PYTHONHASHSEED random + --prefix PYTHONPATH : $PYTHONPATH done - echo "DONE: vcsserver binary wrapping" + echo "[DONE ]: vcsserver binary wrapping" + # expose sources of vcsserver + ln -s $out $out/etc/rhodecode_vcsserver_source ''; }); diff --git a/pkgs/overlays.nix b/pkgs/overlays.nix --- a/pkgs/overlays.nix +++ b/pkgs/overlays.nix @@ -1,9 +1,5 @@ self: super: { - pythonWithSetuptools = self.python.withPackages(ps: with ps; [ - setuptools - ]); - # change GIT version # latest supported are in: https://github.com/NixOS/nixpkgs/tree/master/pkgs/applications/version-management/git-and-tools/git git = super.lib.overrideDerivation super.git (oldAttrs: {