aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie/nixpkgs/pkgs/development/python-modules/scrapy-fake-useragent/default.nix
blob: b2de4e9a993bdc8167e35cfd33e8f0965dc343b3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
{ stdenv, fetchFromGitHub, buildPythonPackage, pytestCheckHook, pytestcov, pytest-mock, fake-useragent, faker, scrapy }:

buildPythonPackage rec {
  pname = "scrapy-fake-useragent";
  version = "1.4.4";

  # PyPi tarball is corrupted
  src = fetchFromGitHub {
    owner = "alecxe";
    repo = pname;
    rev = "59c20d38c58c76618164760d546aa5b989a79b8b"; # no tags
    sha256 = "0yb7d51jws665rdfqkmi077w0pjxmb2ni7ysphj7lx7b18whq54j";
  };

  propagatedBuildInputs = [ fake-useragent faker ];

  checkInputs = [ pytestCheckHook scrapy pytestcov pytest-mock ];

  meta = with stdenv.lib; {
    description = "Random User-Agent middleware based on fake-useragent";
    homepage = "https://github.com/alecxe/scrapy-fake-useragent";
    license = licenses.mit;
  };
}