7e7c98a199
This fixes: Traceback (most recent call last): File "/nix/store/607z14x0spsz1lsh0fg9cbyc9lr038mi-python3.7-snscrape-0.3.0/bin/.snscrape-wrapped", line 11, in <module> sys.exit(main()) File "/nix/store/607z14x0spsz1lsh0fg9cbyc9lr038mi-python3.7-snscrape-0.3.0/lib/python3.7/site-packages/snscrape/cli.py", line 218, in main args = parse_args() File "/nix/store/607z14x0spsz1lsh0fg9cbyc9lr038mi-python3.7-snscrape-0.3.0/lib/python3.7/site-packages/snscrape/cli.py", line 154, in parse_args import snscrape.version File "/nix/store/607z14x0spsz1lsh0fg9cbyc9lr038mi-python3.7-snscrape-0.3.0/lib/python3.7/site-packages/snscrape/version.py", line 1, in <module> import pkg_resources ModuleNotFoundError: No module named 'pkg_resources' Related: https://github.com/NixOS/nixpkgs/pull/68314
39 lines
816 B
Nix
39 lines
816 B
Nix
{ lib
|
|
, buildPythonPackage
|
|
, isPy3k
|
|
, fetchPypi
|
|
, setuptools_scm
|
|
, setuptools
|
|
, requests
|
|
, lxml
|
|
, beautifulsoup4
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "snscrape";
|
|
version = "0.3.0";
|
|
|
|
disabled = !isPy3k;
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
sha256 = "1f3lyq06l8s4kcsmwbxcwcxnv6mvz9c3zj70np8vnx149p3zi983";
|
|
};
|
|
|
|
# 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 ];
|
|
};
|
|
}
|