about summary refs log tree commit diff
path: root/pkgs/development/tools/build-managers/conan
diff options
context:
space:
mode:
authorBjørn Forsman <bjorn.forsman@gmail.com>2021-07-03 16:24:43 +0200
committerBjørn Forsman <bjorn.forsman@gmail.com>2021-07-03 20:45:13 +0200
commit9b16b5e381aeff13484507ed3ce4db608efb8398 (patch)
treee7b786f20cd569f6feecdf2da2dd09dd708d953a /pkgs/development/tools/build-managers/conan
parent9206a3fc64376198c27f225a1dfb275f73e193ca (diff)
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.
Diffstat (limited to 'pkgs/development/tools/build-managers/conan')
-rw-r--r--pkgs/development/tools/build-managers/conan/default.nix19
1 files changed, 18 insertions, 1 deletions
diff --git a/pkgs/development/tools/build-managers/conan/default.nix b/pkgs/development/tools/build-managers/conan/default.nix
index 9c3e99e23ad6f..a7b9d1b76a764 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; {