From 71e7f74ca669e6ed16833a63201d98f70462219d Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Sun, 4 Oct 2020 04:20:00 +0000 Subject: [PATCH] python38Packages.scrapy-fake-useragent: fix build --- .../scrapy-fake-useragent/default.nix | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/scrapy-fake-useragent/default.nix b/pkgs/development/python-modules/scrapy-fake-useragent/default.nix index d3bf05b09655..a9199614f46d 100644 --- a/pkgs/development/python-modules/scrapy-fake-useragent/default.nix +++ b/pkgs/development/python-modules/scrapy-fake-useragent/default.nix @@ -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";