2018-12-24 10:42:06 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, isPy3k
|
|
|
|
, fetchPypi
|
2019-07-01 20:32:16 +01:00
|
|
|
, setuptools_scm
|
2018-12-24 10:42:06 +00:00
|
|
|
, requests
|
|
|
|
, lxml
|
|
|
|
, beautifulsoup4
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "snscrape";
|
2019-07-01 20:32:16 +01:00
|
|
|
version = "0.3.0";
|
2018-12-24 10:42:06 +00:00
|
|
|
|
|
|
|
disabled = !isPy3k;
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2019-07-01 20:32:16 +01:00
|
|
|
sha256 = "1f3lyq06l8s4kcsmwbxcwcxnv6mvz9c3zj70np8vnx149p3zi983";
|
2018-12-24 10:42:06 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
# There are no tests; make sure the executable works.
|
|
|
|
checkPhase = ''
|
|
|
|
export PATH=$PATH:$out/bin
|
|
|
|
snscrape --help
|
|
|
|
'';
|
|
|
|
|
2019-07-01 20:32:16 +01:00
|
|
|
nativeBuildInputs = [ setuptools_scm ];
|
2018-12-24 10:42:06 +00:00
|
|
|
propagatedBuildInputs = [ 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 ];
|
|
|
|
};
|
|
|
|
}
|