Skip to content

Instantly share code, notes, and snippets.

@dustinlacewell
Last active February 7, 2021 05:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dustinlacewell/427c5a5ca4d07c3d316487090e8c0c67 to your computer and use it in GitHub Desktop.
Save dustinlacewell/427c5a5ca4d07c3d316487090e8c0c67 to your computer and use it in GitHub Desktop.
with (import <nixpkgs> {});
with python3.pkgs;
let
quantmod = buildPythonPackage rec {
pname = "quantmod";
version = "0.0.0";
src = ./.;
propagatedBuildInputs = with self; [ numpy pandas pandas-datareader plotly ];
doCheck = false;
};
in mkShell {
buildInputs = [ python3 quantmod numpy pandas pandas-datareader plotly ];
shellHook = ''
# Tells pip to put packages into $PIP_PREFIX instead of the usual locations.
# See https://pip.pypa.io/en/stable/user_guide/#environment-variables.
export PIP_PREFIX=$(pwd)/_build/pip_packages
export PYTHONPATH="$PIP_PREFIX/${pkgs.python3.sitePackages}:$PYTHONPATH"
export PATH="$PIP_PREFIX/bin:$PATH"
unset SOURCE_DATE_EPOCH
'';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment