unrhodecode/pkgs/shell-generate.nix
Marcin Kuzminski c4bd55edf6 packaging: switched to nix 20.03 packages and latest pip2nix code
- dependencies changed:
  atomicwrites==1.4.0
  ipython==5.10.0
  pytest==4.6.9
  py==1.8.1
  pytest-cov==2.8.1
  pytest-sugar==0.9.3
  pytest-runner==5.2.0
  rhodecode-tools==2.0.0
  ipython==5.10.0
  mysqlclient==1.4.6 (change from mysql-python, which is deprecated)
  mako==1.1.2
  lxml==4.5.0
  click==7.1.2
2020-05-11 14:20:30 +02:00

76 lines
1.4 KiB
Nix
Executable file

{ pkgs ? (import <nixpkgs> {})
, pythonPackages ? "python27Packages"
}:
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
pythonPackages.pip-tools
# compile using ffi
pkgs.libffi
pythonPackages.cython
# Allows to generate node dependencies
pkgs.nodePackages.node2nix
# We need mysql_config to be around
pkgs.libmysqlclient
# We need postgresql to be around
pkgs.postgresql
# we need the below for saml
pkgs.libxml2
pkgs.libxslt
pkgs.xmlsec
# Curl is needed for pycurl
pkgs.curl
];
LC_ALL = "en_US.UTF-8";
LOCALE_ARCHIVE =
if pkgs.stdenv.isLinux
then "${pkgs.glibcLocales}/lib/locale/locale-archive"
else "";
shellHook = ''
runHook preShellHook
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
# Custom prompt to distinguish from other dev envs.
export PS1="\n\[\033[1;32m\][pip2nix-generate-shell]$\[\033[0m\] "
export PYCURL_SSL_LIBRARY=openssl
'';
}