From 1980cec089c745cd3c67b7f0772b2c3feb2c9e42 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 30 May 2022 19:37:25 +0200 Subject: [PATCH] python310Packages.pyramid_chameleon: fix compatibility with pyramid 2 --- .../pyramid_chameleon/default.nix | 34 +++++++++++++++---- 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/pyramid_chameleon/default.nix b/pkgs/development/python-modules/pyramid_chameleon/default.nix index 377317049dc8..7a72a47982bc 100644 --- a/pkgs/development/python-modules/pyramid_chameleon/default.nix +++ b/pkgs/development/python-modules/pyramid_chameleon/default.nix @@ -1,29 +1,49 @@ { lib , buildPythonPackage -, fetchPypi , chameleon +, fetchpatch +, fetchPypi , pyramid -, zope_interface +, pytestCheckHook , setuptools +, zope_interface }: buildPythonPackage rec { - pname = "pyramid_chameleon"; + pname = "pyramid-chameleon"; version = "0.3"; src = fetchPypi { - inherit pname version; - sha256 = "d176792a50eb015d7865b44bd9b24a7bd0489fa9a5cebbd17b9e05048cef9017"; + pname = "pyramid_chameleon"; + inherit version; + sha256 = "sha256-0XZ5KlDrAV14ZbRL2bJKe9BIn6mlzrvRe54FBIzvkBc="; }; patches = [ # https://github.com/Pylons/pyramid_chameleon/pull/25 ./test-renderers-pyramid-import.patch + # Compatibility with pyramid 2, https://github.com/Pylons/pyramid_chameleon/pull/34 + (fetchpatch { + name = "support-later-limiter.patch"; + url = "https://github.com/Pylons/pyramid_chameleon/commit/36348bf4c01f52c3461e7ba4d20b1edfc54dba50.patch"; + sha256 = "sha256-cPS7JhcS8nkBS1T0OdZke25jvWHT0qkPFjyPUDKHBGU="; + }) ]; - propagatedBuildInputs = [ chameleon pyramid zope_interface setuptools ]; + propagatedBuildInputs = [ + chameleon + pyramid + setuptools + zope_interface + ]; - pythonImportsCheck = [ "pyramid_chameleon" ]; + checkInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ + "pyramid_chameleon" + ]; meta = with lib; { description = "Chameleon template compiler for pyramid";