##// 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-generate.nix
62 lines | 1.3 KiB | text/x-nix | NixLexer
{ pkgs ? (import <nixpkgs> {})
, pythonPackages ? "python38Packages"
}:
with pkgs.lib;
let
_pythonPackages = pythonPackages;
in
let
pythonPackages = getAttr _pythonPackages pkgs;
pip2nix = import ./nix-common/pip2nix.nix {
inherit
pkgs
pythonPackages;
};
in
pkgs.stdenv.mkDerivation {
name = "pip2nix-generated";
buildInputs = [
# Allows to generate python packages
pip2nix.pip2nix
pip2nix.pip
pip2nix.pip-tools
pip2nix.cython
pip2nix.flit
# compile using ffi
pkgs.libffi
pkgs.apr
pkgs.aprutil
];
shellHook = ''
runHook preShellHook
echo "Setting SVN_* variables"
export SVN_LIBRARY_PATH=${pkgs.subversion}/lib
export SVN_HEADER_PATH=${pkgs.subversion.dev}/include
runHook postShellHook
'';
preShellHook = ''
echo "Starting Generate Shell"
# set unpack source date to 1980 to fix ZIP problems that does not support <1980
export SOURCE_DATE_EPOCH=315532800
export TMPDIR=/tmp
export LOCALE_ARCHIVE="${pkgs.glibcLocales}/lib/locale/locale-archive"
export LC_ALL="en_US.UTF-8"
export PYCURL_SSL_LIBRARY=openssl
# Custom prompt to distinguish from other dev envs.
export PS1="\n\[\033[1;32m\][pip2nix-generate-shell]$\[\033[0m\] "
'';
}