##// END OF EJS Templates
Closing branch: `python3`
Closing branch: `python3`

File last commit:

r4761:ffe072a3 python3
r5438:a9fffebc python3
Show More
shell-generate.nix
73 lines | 1.4 KiB | text/x-nix | NixLexer
/ pkgs / shell-generate.nix
nix: updated to 18.03 nix packages...
r2824 { pkgs ? (import <nixpkgs> {})
, pythonPackages ? "python27Packages"
}:
with pkgs.lib;
packaging: switched to nix 20.03 packages and latest pip2nix code...
r4756 let
_pythonPackages = pythonPackages;
in
nix: updated to 18.03 nix packages...
r2824 let
pythonPackages = getAttr _pythonPackages pkgs;
pip2nix = import ./nix-common/pip2nix.nix {
inherit
pkgs
pythonPackages;
};
in
pkgs.stdenv.mkDerivation {
name = "pip2nix-generated";
packaging: switched to nix 20.03 packages and latest pip2nix code...
r4756
nix: updated to 18.03 nix packages...
r2824 buildInputs = [
# Allows to generate python packages
pip2nix.pip2nix
nix: further nix changes
r4761 pip2nix.pip
pip2nix.pip-tools
packaging: switched to nix 20.03 packages and latest pip2nix code...
r4756 # compile using ffi
pkgs.libffi
pythonPackages.cython
nix: updated to 18.03 nix packages...
r2824
# Allows to generate node dependencies
pkgs.nodePackages.node2nix
# We need mysql_config to be around
packaging: switched to nix 20.03 packages and latest pip2nix code...
r4756 pkgs.libmysqlclient
nix: updated to 18.03 nix packages...
r2824
# We need postgresql to be around
pkgs.postgresql
dependencies: added python-saml library.
r3217 # we need the below for saml
pkgs.libxml2
pkgs.libxslt
pkgs.xmlsec
nix: updated to 18.03 nix packages...
r2824 # Curl is needed for pycurl
pkgs.curl
];
shellHook = ''
runHook preShellHook
runHook postShellHook
'';
preShellHook = ''
echo "Starting Generate Shell"
packaging: switched to nix 20.03 packages and latest pip2nix code...
r4756 # set unpack source date to 1980 to fix ZIP problems that does not support <1980
export SOURCE_DATE_EPOCH=315532800
export TMPDIR=/tmp
nix: generate shell, fixed env flags
r4758 export LOCALE_ARCHIVE="${pkgs.glibcLocales}/lib/locale/locale-archive"
export LC_ALL="en_US.UTF-8"
nix: further nix changes
r4761 export PYCURL_SSL_LIBRARY=openssl
nix: updated to 18.03 nix packages...
r2824 # Custom prompt to distinguish from other dev envs.
packaging: switched to nix 20.03 packages and latest pip2nix code...
r4756 export PS1="\n\[\033[1;32m\][pip2nix-generate-shell]$\[\033[0m\] "
nix: updated to 18.03 nix packages...
r2824 '';
}