summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/scholarly/default.nix
blob: 47ddaed6e059e71d6c8d1800ac3d40cd69e7f79d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
{
  lib,
  arrow,
  beautifulsoup4,
  bibtexparser,
  buildPythonPackage,
  deprecated,
  fake-useragent,
  fetchFromGitHub,
  free-proxy,
  httpx,
  python-dotenv,
  requests,
  selenium,
  setuptools,
  sphinx-rtd-theme,
  stem,
  typing-extensions,
  wheel,
}:

buildPythonPackage rec {
  pname = "scholarly";
  version = "1.7.11";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "scholarly-python-package";
    repo = "scholarly";
    tag = "v${version}";
    hash = "sha256-yvew63tGwSjwseHK7wDqm26xiyCztUzxMqBpwwLD798=";
  };

  build-system = [
    setuptools
    wheel
  ];

  dependencies = [
    arrow
    beautifulsoup4
    bibtexparser
    deprecated
    fake-useragent
    free-proxy
    httpx
    python-dotenv
    requests
    selenium
    sphinx-rtd-theme
    typing-extensions
  ];

  optional-dependencies = {
    tor = [ stem ];
  };

  nativeCheckInputs = lib.concatAttrValues optional-dependencies;

  pythonImportsCheck = [ "scholarly" ];

  meta = {
    description = "Retrieve author and publication information from Google Scholar";
    homepage = "https://scholarly.readthedocs.io/";
    changelog = "https://github.com/scholarly-python-package/scholarly/releases/tag/${src.tag}";
    license = lib.licenses.unlicense;
    maintainers = with lib.maintainers; [ getchoo ];
  };
}