From 0e175ccc4a557583e645666a5b41f2fdf29491a3 Mon Sep 17 00:00:00 2001 From: Raito Bezarius Date: Sat, 10 Feb 2024 16:36:24 +0100 Subject: [PATCH] python3Packages.tpm2-pytss: fix build via a patch for newer cryptography https://github.com/tpm2-software/tpm2-pytss/pull/562 is required to make tpm2-pytss work again with cryptography. Upstream seems unresponsive https://github.com/tpm2-software/tpm2-pytss/pull/559. So I recommend to patch it here and remove it when we don't need it anymore. Signed-off-by: Raito Bezarius --- pkgs/development/python-modules/tpm2-pytss/default.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkgs/development/python-modules/tpm2-pytss/default.nix b/pkgs/development/python-modules/tpm2-pytss/default.nix index 4b0f9adba51b..b6f43516f3a3 100644 --- a/pkgs/development/python-modules/tpm2-pytss/default.nix +++ b/pkgs/development/python-modules/tpm2-pytss/default.nix @@ -55,6 +55,15 @@ buildPythonPackage rec { sha256 = "sha256-Wxe9u7Cvv2vKMGTcK3X8W1Mq/nCt70zrzWUKA+83Sas="; }) + # Inheritance in newer cryptography is not possible anymore + # for `RSAPrivateNumbers` because of a Rust implementation. + # https://github.com/tpm2-software/tpm2-pytss/pull/562 + (fetchpatch { + name = "fix-newer-cryptography-42-0-1-support.patch"; + url = "https://github.com/tpm2-software/tpm2-pytss/commit/0fbb9d099370c0a7031dd13990986538f586836a.patch"; + sha256 = "sha256-xnQIr4/iJra0+rn5estVqSvG8pXcuwWykmmayBpCzgw="; + }) + # Fix hardcoded `fapi-config.json` configuration path ./fapi-config.patch ];