1{ lib, fetchFromGitHub, buildPythonPackage, pytestCheckHook, pytest-cov, pytest-mock, fake-useragent, faker, scrapy }:
2
3buildPythonPackage rec {
4 pname = "scrapy-fake-useragent";
5 version = "1.4.4";
6
7 # PyPi tarball is corrupted
8 src = fetchFromGitHub {
9 owner = "alecxe";
10 repo = pname;
11 rev = "59c20d38c58c76618164760d546aa5b989a79b8b"; # no tags
12 sha256 = "0yb7d51jws665rdfqkmi077w0pjxmb2ni7ysphj7lx7b18whq54j";
13 };
14
15 propagatedBuildInputs = [ fake-useragent faker ];
16
17 nativeCheckInputs = [ pytestCheckHook scrapy pytest-cov pytest-mock ];
18
19 meta = with lib; {
20 description = "Random User-Agent middleware based on fake-useragent";
21 homepage = "https://github.com/alecxe/scrapy-fake-useragent";
22 license = licenses.mit;
23 };
24}