From 9b16b5e381aeff13484507ed3ce4db608efb8398 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Forsman?= Date: Sat, 3 Jul 2021 16:24:43 +0200 Subject: [PATCH] conan: fix build after python3Packages updates conan needs jinja2<3 and six<=1.15.0. Adding six to packageOverrides results in this build error: $ nix-build -A conan ... Found duplicated packages in closure for dependency 'six': six 1.16.0 (/nix/store/zn4haxpv5j9ilccvw7vxxwbfb84vhl5i-python3.8-six-1.16.0/lib/python3.8/site-packages) six 1.15.0 (/nix/store/8nkfc88xal8g91hfjsxq93b6pfydq2d7-python3.8-six-1.15.0/lib/python3.8/site-packages) As the changes in six-1.16.0 look harmless, work around the above issue by allowing conan to use six-1.16.0. --- .../tools/build-managers/conan/default.nix | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/pkgs/development/tools/build-managers/conan/default.nix b/pkgs/development/tools/build-managers/conan/default.nix index 9c3e99e23ad6..a7b9d1b76a76 100644 --- a/pkgs/development/tools/build-managers/conan/default.nix +++ b/pkgs/development/tools/build-managers/conan/default.nix @@ -39,6 +39,22 @@ let newPython = python3.override { "test_ec_verify_should_return_false_if_signature_invalid" ]; }); + # conan needs jinja2<3 + jinja2 = super.jinja2.overridePythonAttrs (oldAttrs: rec { + version = "2.11.3"; + src = oldAttrs.src.override { + inherit version; + sha256 = "a6d58433de0ae800347cab1fa3043cebbabe8baa9d29e668f1c768cb87a333c6"; + }; + }); + # old jinja2 needs old markupsafe + markupsafe = super.markupsafe.overridePythonAttrs (oldAttrs: rec { + version = "1.1.1"; + src = oldAttrs.src.override { + inherit version; + sha256 = "29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b"; + }; + }); }; }; @@ -92,7 +108,8 @@ in newPython.pkgs.buildPythonApplication rec { postPatch = '' substituteInPlace conans/requirements.txt \ - --replace "deprecation>=2.0, <2.1" "deprecation" + --replace "deprecation>=2.0, <2.1" "deprecation" \ + --replace "six>=1.10.0,<=1.15.0" "six>=1.10.0,<=1.16.0" ''; meta = with lib; {