about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/snscrape/default.nix
blob: 9f0b805a19daae8b9a9ca0b310f620bdb06d9d79 (plain) (blame)
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
{ lib
, buildPythonPackage
, isPy3k
, fetchPypi
, setuptools_scm
, setuptools
, requests
, lxml
, beautifulsoup4
}:

buildPythonPackage rec {
  pname = "snscrape";
  version = "0.3.1";

  disabled = !isPy3k;

  src = fetchPypi {
    inherit pname version;
    sha256 = "11jv5mv3l11qjlsjihd74gc1jafq0i7360cksqjkx1wv2hcc32rf";
  };

  # There are no tests; make sure the executable works.
  checkPhase = ''
    export PATH=$PATH:$out/bin
    snscrape --help
  '';

  nativeBuildInputs = [ setuptools_scm ];
  propagatedBuildInputs = [ setuptools requests lxml beautifulsoup4 ];

  meta = with lib; {
    homepage = "https://github.com/JustAnotherArchivist/snscrape";
    description = "A social networking service scraper in Python";
    license = licenses.gpl3Plus;
    maintainers = with maintainers; [ ivan ];
  };
}