From 59bfd1246e7de9e41a70ae13e59dd2cd770cc45e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Fri, 6 Apr 2018 18:01:59 +0200 Subject: [PATCH] pubs: pin pyfakefs version --- pkgs/tools/misc/pubs/default.nix | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/pkgs/tools/misc/pubs/default.nix b/pkgs/tools/misc/pubs/default.nix index aa8c43b7cdd..c9ab32035de 100644 --- a/pkgs/tools/misc/pubs/default.nix +++ b/pkgs/tools/misc/pubs/default.nix @@ -1,7 +1,24 @@ -{ stdenv, fetchFromGitHub, python3Packages }: +{ stdenv, fetchFromGitHub, python3 }: -python3Packages.buildPythonApplication rec { - name = "pubs-${version}"; +let + python3Packages = (python3.override { + packageOverrides = self: super: { + # https://github.com/pubs/pubs/issues/131 + pyfakefs = super.pyfakefs.overridePythonAttrs (oldAttrs: rec { + version = "3.3"; + src = self.fetchPypi { + pname = "pyfakefs"; + inherit version; + sha256 = "e3e198dea5e0d5627b73ba113fd0b139bb417da6bc15d920b2c873143d2f12a6"; + }; + postPatch = ""; + doCheck = false; + }); + }; + }).pkgs; + +in python3Packages.buildPythonApplication rec { + pname = "pubs"; version = "0.7.0"; src = fetchFromGitHub { @@ -13,9 +30,10 @@ python3Packages.buildPythonApplication rec { propagatedBuildInputs = with python3Packages; [ dateutil configobj bibtexparser pyyaml requests beautifulsoup4 - pyfakefs ddt ]; + checkInputs = with python3Packages; [ pyfakefs ddt ]; + preCheck = '' # API tests require networking rm tests/test_apis.py @@ -29,6 +47,5 @@ python3Packages.buildPythonApplication rec { homepage = https://github.com/pubs/pubs; license = licenses.lgpl3; maintainers = with maintainers; [ gebner ]; - platforms = platforms.all; }; }