From 5aa4b7f130351c016a552436293ea5c2243b4558 Mon Sep 17 00:00:00 2001 From: wxt <3264117476@qq.com> Date: Sun, 19 Jan 2025 17:12:51 +0800 Subject: [PATCH 1/4] python313Packages.sigstore-rekor-types: add bot-wxt1221 as maintainers --- .../python-modules/sigstore-rekor-types/default.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/sigstore-rekor-types/default.nix b/pkgs/development/python-modules/sigstore-rekor-types/default.nix index ba523fe259a1..d1a46c8b5d24 100644 --- a/pkgs/development/python-modules/sigstore-rekor-types/default.nix +++ b/pkgs/development/python-modules/sigstore-rekor-types/default.nix @@ -28,11 +28,14 @@ buildPythonPackage rec { # Module has no tests doCheck = false; - meta = with lib; { + meta = { description = "Python models for Rekor's API types"; homepage = "https://github.com/trailofbits/sigstore-rekor-types"; changelog = "https://github.com/trailofbits/sigstore-rekor-types/releases/tag/v${version}"; - license = licenses.asl20; - maintainers = with maintainers; [ fab ]; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ + fab + bot-wxt1221 + ]; }; } From a1009efabf319a3c83995eb3390ca1c83223102f Mon Sep 17 00:00:00 2001 From: wxt <3264117476@qq.com> Date: Sun, 19 Jan 2025 17:13:41 +0800 Subject: [PATCH 2/4] python313Packages.rfc3161-client: init at 1.0.0 --- .../python-modules/rfc3161-client/default.nix | 52 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 54 insertions(+) create mode 100644 pkgs/development/python-modules/rfc3161-client/default.nix diff --git a/pkgs/development/python-modules/rfc3161-client/default.nix b/pkgs/development/python-modules/rfc3161-client/default.nix new file mode 100644 index 000000000000..6d56846dbee0 --- /dev/null +++ b/pkgs/development/python-modules/rfc3161-client/default.nix @@ -0,0 +1,52 @@ +{ + buildPythonPackage, + lib, + fetchFromGitHub, + perl, + cryptography, + rustPlatform, + pretend, + pytestCheckHook, +}: + +buildPythonPackage rec { + pname = "rfc3161-client"; + version = "1.0.0"; + pyproject = true; + + src = fetchFromGitHub { + owner = "trailofbits"; + repo = "rfc3161-client"; + tag = "v${version}"; + hash = "sha256-fdNpM5fQnvwBgeL/adIb74pywtK6+8dLxc6kIVgCOCw="; + }; + + cargoDeps = rustPlatform.fetchCargoVendor { + inherit src pname; + hash = "sha256-jpysrco+dybMwiKOa21uLKqsOeYFFERL7XKND7gPwX8="; + }; + + nativeBuildInputs = [ + rustPlatform.cargoSetupHook + rustPlatform.maturinBuildHook + perl + ]; + + dependencies = [ + cryptography + pretend + ]; + + nativeCheckInputs = [ + pytestCheckHook + ]; + + meta = { + homepage = "https://github.com/trailofbits/rfc3161-client"; + maintainers = with lib.maintainers; [ bot-wxt1221 ]; + license = lib.licenses.asl20; + platforms = lib.platforms.all; + changelog = "https://github.com/trailofbits/rfc3161-client/releases/tag/v${version}"; + description = "Opinionated Python RFC3161 Client"; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 54ea65a96643..ff3cd8bb7b51 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -14144,6 +14144,8 @@ self: super: with self; { reverse-geocode = callPackage ../development/python-modules/reverse-geocode { }; + rfc3161-client = callPackage ../development/python-modules/rfc3161-client { }; + rfc3339 = callPackage ../development/python-modules/rfc3339 { }; rfc3339-validator = callPackage ../development/python-modules/rfc3339-validator { }; From 483e9f80b54ce68681b136553fb4381d0b8f8b35 Mon Sep 17 00:00:00 2001 From: wxt <3264117476@qq.com> Date: Sun, 19 Jan 2025 17:41:07 +0800 Subject: [PATCH 3/4] python313Packages.betterproto: fix build --- .../python-modules/betterproto/default.nix | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/betterproto/default.nix b/pkgs/development/python-modules/betterproto/default.nix index 48db179f7240..6eb47812b1df 100644 --- a/pkgs/development/python-modules/betterproto/default.nix +++ b/pkgs/development/python-modules/betterproto/default.nix @@ -33,6 +33,11 @@ buildPythonPackage rec { hash = "sha256-ZuVq4WERXsRFUPNNTNp/eisWX1MyI7UtwqEI8X93wYI="; }; + postPatch = '' + substituteInPlace pyproject.toml \ + --replace-fail "poetry-core>=1.0.0,<2" "poetry-core" + ''; + build-system = [ poetry-core ]; dependencies = [ @@ -78,7 +83,7 @@ buildPythonPackage rec { "test_binary_compatibility" ]; - meta = with lib; { + meta = { description = "Code generator & library for Protobuf 3 and async gRPC"; mainProgram = "protoc-gen-python_betterproto"; longDescription = '' @@ -88,7 +93,7 @@ buildPythonPackage rec { ''; homepage = "https://github.com/danielgtaylor/python-betterproto"; changelog = "https://github.com/danielgtaylor/python-betterproto/blob/v.${version}/CHANGELOG.md"; - license = licenses.mit; - maintainers = with maintainers; [ nikstur ]; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ nikstur ]; }; } From be09d1ed947ce4b6b46b5c706a55f3bc2a3d8319 Mon Sep 17 00:00:00 2001 From: wxt <3264117476@qq.com> Date: Sun, 19 Jan 2025 17:14:01 +0800 Subject: [PATCH 4/4] python313Packages.sigstore: 3.5.3 -> 3.6.1 --- pkgs/development/python-modules/sigstore/default.nix | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/sigstore/default.nix b/pkgs/development/python-modules/sigstore/default.nix index f4983e93590c..2bcc833a541a 100644 --- a/pkgs/development/python-modules/sigstore/default.nix +++ b/pkgs/development/python-modules/sigstore/default.nix @@ -19,6 +19,7 @@ securesystemslib, sigstore-protobuf-specs, sigstore-rekor-types, + rfc3161-client, tuf, rfc8785, pyasn1, @@ -27,7 +28,7 @@ buildPythonPackage rec { pname = "sigstore-python"; - version = "3.5.3"; + version = "3.6.1"; pyproject = true; disabled = pythonOlder "3.8"; @@ -36,10 +37,13 @@ buildPythonPackage rec { owner = "sigstore"; repo = "sigstore-python"; tag = "v${version}"; - hash = "sha256-pAzS/LU5me3qoJo6EmuSFPDO/lqRDKIl5hjFiysWTdM="; + hash = "sha256-BdVX2LWCsMx9r0bDTJjMdrvy4Hqn6hrw9wAcub0nRMk="; }; - pythonRelaxDeps = [ "sigstore-rekor-types" ]; + pythonRelaxDeps = [ + "sigstore-rekor-types" + "rfc3161-client" + ]; build-system = [ flit-core ]; @@ -53,6 +57,7 @@ buildPythonPackage rec { pyopenssl pyasn1 rfc8785 + rfc3161-client platformdirs requests rich @@ -88,6 +93,7 @@ buildPythonPackage rec { "test_trust_root_bundled_get" "test_fix_bundle_upgrades_bundle" "test_trust_root_tuf_caches_and_requests" + "test_regression_verify_legacy_bundle" ]; passthru.updateScript = nix-update-script { };