##// END OF EJS Templates
py3: fix python version read.
py3: fix python version read.

File last commit:

r970:50f14aba python3
r980:328a152e python3
Show More
shell.nix
66 lines | 1.7 KiB | text/x-nix | NixLexer
nix: updated to 18.03 packages....
r472 # This file contains the adjustments which are desired for a development
# environment.
{ pkgs ? (import <nixpkgs> {})
, pythonPackages ? "python27Packages"
requirements: added ipdb (0.10.1) support.
r96 , doCheck ? false
initial commit
r0 }:
let
requirements: added ipdb (0.10.1) support.
r96
nix: Propagate doCheck argument through nix files.
r34 vcsserver = import ./default.nix {
nix: updated to 18.03 packages....
r472 inherit
doCheck;
nix: Propagate doCheck argument through nix files.
r34 };
initial commit
r0
Martin Bornhold
nix: Move shell hook from default.nix -> shell.nix and set custom shell prompt.
r95 vcs-pythonPackages = vcsserver.pythonPackages;
packaging: switched to nix 20.03 packages and latest pip2nix code...
r970 in vcsserver.override (attrs: rec {
initial commit
r0 # Avoid that we dump any sources into the store when entering the shell and
# make development a little bit more convenient.
src = null;
nix: updated to 18.03 packages....
r472 # Add dependencies which are useful for the development environment.
requirements: added ipdb (0.10.1) support.
r96 buildInputs =
attrs.buildInputs ++
(with vcs-pythonPackages; [
ipdb
]);
nix: updated to 18.03 packages....
r472 # place to inject some required libs from develop installs
propagatedBuildInputs =
attrs.propagatedBuildInputs ++
[];
# Make sure we execute both hooks
shellHook = ''
runHook preShellHook
runHook postShellHook
'';
preShellHook = ''
packaging: switched to nix 20.03 packages and latest pip2nix code...
r970 echo "Entering vcsserver-shell"
Martin Bornhold
nix: Move shell hook from default.nix -> shell.nix and set custom shell prompt.
r95
# Custom prompt to distinguish from other dev envs.
packaging: switched to nix 20.03 packages and latest pip2nix code...
r970 export PS1="\n\[\033[1;32m\][vcsserver-shell:\w]$\[\033[0m\] "
Martin Bornhold
nix: Move shell hook from default.nix -> shell.nix and set custom shell prompt.
r95
nix: updated to 18.03 packages....
r472 # Set locale
packaging: switched to nix 20.03 packages and latest pip2nix code...
r970 export LOCALE_ARCHIVE="${pkgs.glibcLocales}/lib/locale/locale-archive"
nix: updated to 18.03 packages....
r472 export LC_ALL="en_US.UTF-8"
# Setup a temporary directory.
Martin Bornhold
nix: Move shell hook from default.nix -> shell.nix and set custom shell prompt.
r95 tmp_path=$(mktemp -d)
packaging: switched to nix 20.03 packages and latest pip2nix code...
r970 export PATH="${pkgs.subversion}/bin:${pkgs.git}/bin:${vcs-pythonPackages.mercurial}/bin:$tmp_path/bin:$PATH"
Martin Bornhold
nix: Move shell hook from default.nix -> shell.nix and set custom shell prompt.
r95 export PYTHONPATH="$tmp_path/${vcs-pythonPackages.python.sitePackages}:$PYTHONPATH"
mkdir -p $tmp_path/${vcs-pythonPackages.python.sitePackages}
nix: updated to 18.03 packages....
r472
# Develop installation
echo "[BEGIN]: develop install of rhodecode-vcsserver"
Martin Bornhold
nix: Move shell hook from default.nix -> shell.nix and set custom shell prompt.
r95 python setup.py develop --prefix $tmp_path --allow-hosts ""
'';
nix: updated to 18.03 packages....
r472
postShellHook = ''
'';
initial commit
r0 })