nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 beautifulsoup4,
4 buildPythonPackage,
5 cryptography,
6 curl-cffi,
7 fetchFromGitHub,
8 frozendict,
9 html5lib,
10 lxml,
11 multitasking,
12 numpy,
13 pandas,
14 peewee,
15 platformdirs,
16 protobuf,
17 pytz,
18 requests-cache,
19 requests-ratelimiter,
20 requests,
21 scipy,
22 setuptools,
23 websockets,
24}:
25
26buildPythonPackage rec {
27 pname = "yfinance";
28 version = "1.0";
29 pyproject = true;
30
31 src = fetchFromGitHub {
32 owner = "ranaroussi";
33 repo = "yfinance";
34 tag = version;
35 hash = "sha256-84iiRqroaoqcvJqGvgk7baJ/vdgmyWy4V8KRNUtwnoU=";
36 };
37
38 build-system = [ setuptools ];
39
40 dependencies = [
41 beautifulsoup4
42 cryptography
43 curl-cffi
44 frozendict
45 html5lib
46 lxml
47 multitasking
48 numpy
49 pandas
50 peewee
51 platformdirs
52 protobuf
53 pytz
54 requests
55 websockets
56 ];
57
58 pythonRelaxDeps = [ "curl_cffi" ];
59
60 optional-dependencies = {
61 nospam = [
62 requests-cache
63 requests-ratelimiter
64 ];
65 repair = [
66 scipy
67 ];
68 };
69
70 # Tests require internet access
71 doCheck = false;
72
73 pythonImportsCheck = [ "yfinance" ];
74
75 meta = {
76 description = "Module to doiwnload Yahoo! Finance market data";
77 homepage = "https://github.com/ranaroussi/yfinance";
78 changelog = "https://github.com/ranaroussi/yfinance/blob/${src.tag}/CHANGELOG.rst";
79 license = lib.licenses.asl20;
80 maintainers = [ ];
81 };
82}