Skip to content

Instantly share code, notes, and snippets.

@dustinlacewell
Created February 7, 2021 05:58
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/c8bdce8ec1cef1fc6fd32eab619f7f21 to your computer and use it in GitHub Desktop.
Save dustinlacewell/c8bdce8ec1cef1fc6fd32eab619f7f21 to your computer and use it in GitHub Desktop.
with (import <nixpkgs> {});
let
talib = python3.pkgs.buildPythonPackage rec {
pname = "TA-Lib";
version = "0.4.19";
src = python3.pkgs.fetchPypi {
inherit pname version;
sha256 = "1d8xag1h3sd6pbna70gl45dvd4aqr1kqffsdrfp8pw7qk1w240sk";
};
propagatedBuildInputs = with python3.pkgs; [
numpy
];
# No tests in archive
doCheck = false;
};
plotly = python3.pkgs.buildPythonPackage rec {
pname = "plotly";
version = "3.10.0";
src = python3.pkgs.fetchPypi {
inherit pname version;
sha256 = "164aav7i3ann1lv3xbb76ylpph4hissl0wsnmil1s3m0r7sk7jsx";
};
propagatedBuildInputs = with python3.pkgs; [
decorator
nbformat
pytz
requests
retrying
six
];
# No tests in archive
doCheck = false;
};
quantmod = python3.pkgs.buildPythonPackage rec {
pname = "quantmod";
version = "0.0.0";
src = ./.;
propagatedBuildInputs = with python3.pkgs; [ numpy pandas pandas-datareader plotly talib ];
doCheck = false;
};
in mkShell {
buildInputs = [ python3 quantmod ];
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