Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python311Packages.tpm2-pytss: 2.1.0 → 2.2.1 #288186

Merged
merged 1 commit into from Mar 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
38 changes: 2 additions & 36 deletions pkgs/development/python-modules/tpm2-pytss/default.nix
@@ -1,7 +1,6 @@
{ lib
, buildPythonPackage
, fetchPypi
, fetchpatch
, pythonOlder
, asn1crypto
, cffi
Expand All @@ -20,50 +19,17 @@

buildPythonPackage rec {
pname = "tpm2-pytss";
version = "2.1.0";
version = "2.2.1";
format = "setuptools";

disabled = pythonOlder "3.7";

src = fetchPypi {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI we can also just fetch from GitHub. There is often really no point fetching something from pypi

inherit pname version;
hash = "sha256-W1tLFFb9wa7vPSw5cL6qB4yPfyZIyXppvPYMWi+VyJc=";
hash = "sha256-uPFUc0IvN39ZxyF9zRR5FlzOYt+jOTTsl2oni68unv4=";
};

patches = [
# This patches the call to the C preprocessor not to include types
# pycparser does not handle.
# `hardeningDisable = [ "fortify" ]` would have the same effect but
# would also disable hardening from generated FFI objects.
#
# backport of https://github.com/tpm2-software/tpm2-pytss/pull/523
(fetchpatch {
url = "https://github.com/baloo/tpm2-pytss/commit/099c069f28cfcd0a3019adebfeafa976f9395221.patch";
sha256 = "sha256-wU2WfLYFDmkhGzYornZ386tB3zb3GYfGOTc+/QOFb1o=";
})

# Lookup tcti via getinfo not system's ld_library_path
# https://github.com/tpm2-software/tpm2-pytss/pull/525
(fetchpatch {
url = "https://github.com/tpm2-software/tpm2-pytss/commit/97289a08ddf44f7bdccdd122d6055c69e12dc584.patch";
sha256 = "sha256-VFq3Hv4I8U8ifP/aSjyu0BiW/4jfPlRDKqRcqUGw6UQ=";
})

(fetchpatch {
name = "test-new-cryptography.patch";
url = "https://github.com/tpm2-software/tpm2-pytss/commit/e4006e6066c015d9ed55befa9b98247fbdcafd7d.diff";
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
];
Expand Down