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