From 81fc2ad582d0c7cd2b9d31fcac4d9a68c9612286 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Sun, 7 Jun 2020 15:04:13 +0200 Subject: [PATCH] python2.pkgs.pyhamcrest: keep 1.10.1 for python 2 --- .../python-modules/pyhamcrest/1.nix | 27 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 5 +++- 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 pkgs/development/python-modules/pyhamcrest/1.nix diff --git a/pkgs/development/python-modules/pyhamcrest/1.nix b/pkgs/development/python-modules/pyhamcrest/1.nix new file mode 100644 index 00000000000..592172c6550 --- /dev/null +++ b/pkgs/development/python-modules/pyhamcrest/1.nix @@ -0,0 +1,27 @@ +{ stdenv, buildPythonPackage, fetchPypi +, mock, pytest +, six +}: +buildPythonPackage rec { + pname = "PyHamcrest"; + version = "1.10.1"; + + src = fetchPypi { + inherit pname version; + sha256 = "0x08lfcnsak7pkym32xrdn0sn3wcf26n1jff3d11mwbizpfikbpp"; + }; + + checkInputs = [ mock pytest ]; + propagatedBuildInputs = [ six ]; + + doCheck = false; # pypi tarball does not include tests + + meta = with stdenv.lib; { + homepage = "https://github.com/hamcrest/PyHamcrest"; + description = "Hamcrest framework for matcher objects"; + license = licenses.bsd3; + maintainers = with maintainers; [ + alunduil + ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 06ab8621f3f..7ca53e402d6 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -7278,7 +7278,10 @@ in { behave = callPackage ../development/python-modules/behave { }; - pyhamcrest = callPackage ../development/python-modules/pyhamcrest { }; + pyhamcrest = if isPy3k then + callPackage ../development/python-modules/pyhamcrest { } + else + callPackage ../development/python-modules/pyhamcrest/1.nix { }; pyhaversion = callPackage ../development/python-modules/pyhaversion { };