##// END OF EJS Templates
py3: switched to python38 by default.
py3: switched to python38 by default.

File last commit:

r989:4fa1c36e python3
r989:4fa1c36e python3
Show More
shell.nix
50 lines | 1.3 KiB | text/x-nix | NixLexer
# This file contains the adjustments which are desired for a development
# environment.
{ pkgs ? (import <nixpkgs> {})
, pythonPackages ? "python38Packages"
, doCheck ? false
}:
let
# Full runtime environment without the actual Python package
env = import ./default.nix {
inherit
doCheck;
pythonExternalOverrides = self: super: {
rhodecode-vcsserver = null;
};
};
# The python package with full runtime environment as dependency for nix-shell
package = (import ./default.nix {
inherit
doCheck;
pythonExternalOverrides = self: super: {
rhodecode-vcsserver = super.rhodecode-vcsserver.overridePythonAttrs(attrs: {
nativeBuildInputs = with self;
attrs.nativeBuildInputs ++
attrs.buildInputs ++
attrs.propagatedBuildInputs ++ [
env
pytest
ipdb
ipython
];
});
};
}).passthru.pythonPackages.rhodecode-vcsserver;
in package.overridePythonAttrs(attrs: {
postShellHook= ''
# Custom prompt to distinguish from other dev envs.
export PS1="\n\[\033[1;32m\][vcsserver-shell:\w]$\[\033[0m\] "
# Set locale
export LOCALE_ARCHIVE="${pkgs.glibcLocales}/lib/locale/locale-archive"
export LC_ALL="en_US.UTF-8"
'';
})