##// END OF EJS Templates
release: Finish preparation for 4.11.1
release: Finish preparation for 4.11.1

File last commit:

r326:15ece812 default
r361:92471577 v4.11.1 stable
Show More
default.nix
166 lines | 5.0 KiB | text/x-nix | NixLexer
initial commit
r0 # Nix environment for the community edition
#
# This shall be as lean as possible, just producing the rhodecode-vcsserver
# derivation. For advanced tweaks to pimp up the development environment we use
# "shell.nix" so that it does not have to clutter this file.
{ pkgs ? (import <nixpkgs> {})
, pythonPackages ? "python27Packages"
, pythonExternalOverrides ? self: super: {}
, doCheck ? true
}:
let pkgs_ = pkgs; in
let
pkgs = pkgs_.overridePackages (self: super: {
dependencies: bumped git version to 2.9.3
r116 # bump GIT version
git = pkgs.lib.overrideDerivation pkgs_.git (oldAttrs: {
git: updated git binaries to 2.13.5 release
r272 name = "git-2.13.5";
dependencies: bumped git version to 2.9.3
r116 src = pkgs.fetchurl {
git: updated git binaries to 2.13.5 release
r272 url = "https://www.kernel.org/pub/software/scm/git/git-2.13.5.tar.xz";
sha256 = "18fi18103n7grshm4ffb0fwsnvbl48sbqy5gqx528vf8maff5j91";
dependencies: bumped git version to 2.9.3
r116 };
git: updated git binaries to 2.13.5 release
r272 patches = [
./pkgs/git_patches/docbook2texi.patch
./pkgs/git_patches/symlinks-in-bin.patch
./pkgs/git_patches/git-sh-i18n.patch
./pkgs/git_patches/ssh-path.patch
];
dependencies: bumped git version to 2.9.3
r116 });
initial commit
r0 # Override subversion derivation to
# - activate python bindings
Nix: Patch subversion on Darwin...
r74 subversion = let
subversionWithPython = super.subversion.override {
httpSupport = true;
pythonBindings = true;
python = self.python27Packages.python;
};
dependencies: bumped git version to 2.9.3
r116
in
pkgs.lib.overrideDerivation subversionWithPython (oldAttrs: {
svn: bumped to version 1.9.7 with latest security releases
r253 name = "subversion-1.9.7";
src = pkgs.fetchurl {
url = "https://www.apache.org/dist/subversion/subversion-1.9.7.tar.gz";
sha256 = "0g3cs2h008z8ymgkhbk54jp87bjh7y049rn42igj881yi2f20an7";
};
Nix: Patch subversion on Darwin...
r74 });
dependencies: bumped git version to 2.9.3
r116
initial commit
r0 });
inherit (pkgs.lib) fix extends;
basePythonPackages = with builtins; if isAttrs pythonPackages
then pythonPackages
else getAttr pythonPackages pkgs;
elem = builtins.elem;
basename = path: with pkgs.lib; last (splitString "/" path);
startsWith = prefix: full: let
actualPrefix = builtins.substring 0 (builtins.stringLength prefix) full;
in actualPrefix == prefix;
src-filter = path: type: with pkgs.lib;
let
ext = last (splitString "." path);
in
nix: added custom checkPhase to remove sugar output during package building.
r135 !elem (basename path) [".hg" ".git" "__pycache__" ".eggs"
"node_modules" "build" "data" "tmp"] &&
initial commit
r0 !elem ext ["egg-info" "pyc"] &&
!startsWith "result" path;
rhodecode-vcsserver-src = builtins.filterSource src-filter ./.;
pythonGeneratedPackages = self: basePythonPackages.override (a: {
inherit self;
nix: added custom checkPhase to remove sugar output during package building.
r135 }) // (scopedImport {
initial commit
r0 self = self;
super = basePythonPackages;
inherit pkgs;
inherit (pkgs) fetchurl fetchgit;
} ./pkgs/python-packages.nix);
pythonOverrides = import ./pkgs/python-packages-overrides.nix {
nix: added custom checkPhase to remove sugar output during package building.
r135 inherit basePythonPackages pkgs;
initial commit
r0 };
packaging: Include version in name
r18 version = builtins.readFile ./vcsserver/VERSION;
initial commit
r0 pythonLocalOverrides = self: super: {
rhodecode-vcsserver = super.rhodecode-vcsserver.override (attrs: {
nix: added custom checkPhase to remove sugar output during package building.
r135 inherit doCheck version;
packaging: Include version in name
r18 name = "rhodecode-vcsserver-${version}";
nix: Add releaseName to derivation.
r33 releaseName = "RhodeCodeVCSServer-${version}";
initial commit
r0 src = rhodecode-vcsserver-src;
packaging: don't run strip on sources for python packages
r174 dontStrip = true; # prevent strip, we don't need it.
initial commit
r0
propagatedBuildInputs = attrs.propagatedBuildInputs ++ ([
pkgs.git
pkgs.subversion
]);
# TODO: johbo: Make a nicer way to expose the parts. Maybe
# pkgs/default.nix?
passthru = {
pythonPackages = self;
};
# Add VCSServer bin directory to path so that tests can find 'vcsserver'.
preCheck = ''
export PATH="$out/bin:$PATH"
'';
nix: added custom checkPhase to remove sugar output during package building.
r135 # put custom attrs here
checkPhase = ''
runHook preCheck
PYTHONHASHSEED=random py.test -p no:sugar -vv --cov-config=.coveragerc --cov=vcsserver --cov-report=term-missing vcsserver
runHook postCheck
'';
initial commit
r0 postInstall = ''
echo "Writing meta information for rccontrol to nix-support/rccontrol"
mkdir -p $out/nix-support/rccontrol
cp -v vcsserver/VERSION $out/nix-support/rccontrol/version
echo "DONE: Meta information for rccontrol written"
default.nix:updated format to be consistent with CE package
r226 # python based programs need to be wrapped
Martin Bornhold
nix: Use --set instead of --prefix for setting the PATH / PYTHONPATH...
r89 ln -s ${self.pyramid}/bin/* $out/bin/
initial commit
r0 ln -s ${self.gunicorn}/bin/gunicorn $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.
core: added wrapped python into binaries so we can execute python hooks that have proper...
r326 ln -s ${self.python}/bin/python $out/bin
initial commit
r0 ln -s ${pkgs.git}/bin/git $out/bin
ln -s ${self.mercurial}/bin/hg $out/bin
ln -s ${pkgs.subversion}/bin/svn* $out/bin
default.nix:updated format to be consistent with CE package
r226 for file in $out/bin/*;
do
initial commit
r0 wrapProgram $file \
Martin Bornhold
nix: Use --set instead of --prefix for setting the PATH / PYTHONPATH...
r89 --set PATH $PATH \
--set PYTHONPATH $PYTHONPATH \
initial commit
r0 --set PYTHONHASHSEED random
done
default.nix:updated format to be consistent with CE package
r226
initial commit
r0 '';
});
};
# Apply all overrides and fix the final package set
myPythonPackages =
(fix
(extends pythonExternalOverrides
(extends pythonLocalOverrides
(extends pythonOverrides
pythonGeneratedPackages))));
in myPythonPackages.rhodecode-vcsserver