1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-25 15:11:35 +00:00

python38Packages.scrapy-fake-useragent: fix build

This commit is contained in:
Mario Rodas 2020-10-04 04:20:00 +00:00
parent 79d98706cd
commit 71e7f74ca6

View file

@ -1,17 +1,20 @@
{ stdenv, fetchPypi, buildPythonPackage, pytest, fake-useragent, scrapy }:
{ stdenv, fetchFromGitHub, buildPythonPackage, pytestCheckHook, pytestcov, pytest-mock, fake-useragent, faker, scrapy }:
buildPythonPackage rec {
pname = "scrapy-fake-useragent";
version = "1.4.4";
src = fetchPypi {
inherit pname version;
sha256 = "3b17e982e646918dc25080da0672812d07bfb7a92a58377c014c74e0182c665e";
# PyPi tarball is corrupted
src = fetchFromGitHub {
owner = "alecxe";
repo = pname;
rev = "59c20d38c58c76618164760d546aa5b989a79b8b"; # no tags
sha256 = "0yb7d51jws665rdfqkmi077w0pjxmb2ni7ysphj7lx7b18whq54j";
};
propagatedBuildInputs = [ fake-useragent ];
propagatedBuildInputs = [ fake-useragent faker ];
checkInputs = [ pytest scrapy ];
checkInputs = [ pytestCheckHook scrapy pytestcov pytest-mock ];
meta = with stdenv.lib; {
description = "Random User-Agent middleware based on fake-useragent";