Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 beautifulsoup4, 4 buildPythonPackage, 5 fetchFromGitHub, 6 filelock, 7 lxml, 8 pythonOlder, 9 pytz, 10 requests, 11 setuptools-scm, 12}: 13 14buildPythonPackage rec { 15 pname = "snscrape"; 16 version = "0.7.0.20230622"; 17 format = "pyproject"; 18 19 disabled = pythonOlder "3.8"; 20 21 src = fetchFromGitHub { 22 owner = "JustAnotherArchivist"; 23 repo = pname; 24 rev = "refs/tags/v${version}"; 25 hash = "sha256-9xAUMr1SWFePEvIz6DFEexk9Txex3u8wPNfMAdxEUCA="; 26 }; 27 28 nativeBuildInputs = [ setuptools-scm ]; 29 30 propagatedBuildInputs = [ 31 beautifulsoup4 32 filelock 33 lxml 34 requests 35 ] ++ requests.optional-dependencies.socks ++ lib.optionals (pythonOlder "3.9") [ pytz ]; 36 37 # There are no tests; make sure the executable works. 38 checkPhase = '' 39 export PATH=$PATH:$out/bin 40 snscrape --help 41 ''; 42 43 pythonImportsCheck = [ "snscrape" ]; 44 45 meta = with lib; { 46 description = "Social networking service scraper"; 47 mainProgram = "snscrape"; 48 homepage = "https://github.com/JustAnotherArchivist/snscrape"; 49 license = licenses.gpl3Plus; 50 maintainers = with maintainers; [ ivan ]; 51 }; 52}