From 101372127a3c34d3da0420c827641c0cf3c114f7 Mon Sep 17 00:00:00 2001 From: pennae Date: Fri, 29 Jul 2022 21:56:51 +0200 Subject: [PATCH] pass-secret-service: unstable-2022-03-21 -> unstable-2022-07-18 fixes the build. patch doesn't seem necessary any more as the mentioned PR has been merged. --- .../misc/pass-secret-service/default.nix | 12 +++------- .../int_from_bytes-deprecation-fix.patch | 22 ------------------- 2 files changed, 3 insertions(+), 31 deletions(-) delete mode 100644 pkgs/applications/misc/pass-secret-service/int_from_bytes-deprecation-fix.patch diff --git a/pkgs/applications/misc/pass-secret-service/default.nix b/pkgs/applications/misc/pass-secret-service/default.nix index 6a57c15b742..d7ac4fa21e7 100644 --- a/pkgs/applications/misc/pass-secret-service/default.nix +++ b/pkgs/applications/misc/pass-secret-service/default.nix @@ -12,21 +12,15 @@ python3.pkgs.buildPythonApplication rec { # PyPI has old alpha version. Since then the project has switched from using a # seemingly abandoned D-Bus package pydbus and started using maintained # dbus-next. So let's use latest from GitHub. - version = "unstable-2022-03-21"; + version = "unstable-2022-07-18"; src = fetchFromGitHub { owner = "mdellweg"; repo = "pass_secret_service"; - rev = "149f8557e07098eee2f46561eea61e83255ac59b"; - sha256 = "sha256-+/pFi6+K8rl0Ihm6cp/emUQVtau6+Apl8/VEr9AI0Xs="; + rev = "fadc09be718ae1e507eeb8719f3a2ea23edb6d7a"; + hash = "sha256-lrNU5bkG4/fMu5rDywfiI8vNHyBsMf/fiWIeEHug03c="; }; - patches = [ - # Only needed until https://github.com/mdellweg/pass_secret_service/pull/30 - # is merged. - ./int_from_bytes-deprecation-fix.patch - ]; - # Need to specify session.conf file for tests because it won't be found under # /etc/ in check phase. postPatch = '' diff --git a/pkgs/applications/misc/pass-secret-service/int_from_bytes-deprecation-fix.patch b/pkgs/applications/misc/pass-secret-service/int_from_bytes-deprecation-fix.patch deleted file mode 100644 index b7e78e7b791..00000000000 --- a/pkgs/applications/misc/pass-secret-service/int_from_bytes-deprecation-fix.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- a/pass_secret_service/interfaces/session.py -+++ b/pass_secret_service/interfaces/session.py -@@ -4,7 +4,6 @@ - import os - import hmac - from hashlib import sha256 --from cryptography.utils import int_from_bytes - from cryptography.hazmat.backends import default_backend - from cryptography.hazmat.primitives.ciphers import Cipher - from cryptography.hazmat.primitives.ciphers.modes import CBC -@@ -27,9 +26,9 @@ class Session(ServiceInterface, SerialMixin): - @classmethod - @run_in_executor - def _create_dh(cls, input): -- priv_key = int_from_bytes(os.urandom(0x80), "big") -+ priv_key = int.from_bytes(os.urandom(0x80), "big") - pub_key = pow(2, priv_key, dh_prime) -- shared_secret = pow(int_from_bytes(input, "big"), priv_key, dh_prime) -+ shared_secret = pow(int.from_bytes(input, "big"), priv_key, dh_prime) - salt = b"\x00" * 0x20 - shared_key = hmac.new(salt, shared_secret.to_bytes(0x80, "big"), sha256).digest() - aes_key = hmac.new(shared_key, b"\x01", sha256).digest()[:0x10]