uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead

https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948
this can do it nicely.

Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
Anton Arapov 2021-04-03 12:58:10 +02:00 committed by Alan Daniels
commit 56de2bcd43
30691 changed files with 3076956 additions and 0 deletions

View file

@ -0,0 +1,41 @@
From 48da17d61e38657dfb10f2ac642fd3e6a45ee607 Mon Sep 17 00:00:00 2001
From: "P. R. d. O" <d.ol.rod@tutanota.com>
Date: Wed, 27 Apr 2022 14:29:53 -0600
Subject: [PATCH] OpenSSL path fix
---
proton/srp/_ctsrp.py | 12 ++----------
1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/proton/srp/_ctsrp.py b/proton/srp/_ctsrp.py
index e19f184..af359c5 100644
--- a/proton/srp/_ctsrp.py
+++ b/proton/srp/_ctsrp.py
@@ -24,22 +24,14 @@ from .util import PM_VERSION, SRP_LEN_BYTES, SALT_LEN_BYTES, hash_password
dlls = list()
platform = sys.platform
-if platform == 'darwin':
- dlls.append(ctypes.cdll.LoadLibrary('libssl.dylib'))
-elif 'win' in platform:
+if 'win' in platform:
for d in ('libeay32.dll', 'libssl32.dll', 'ssleay32.dll'):
try:
dlls.append(ctypes.cdll.LoadLibrary(d))
except Exception:
pass
else:
- try:
- dlls.append(ctypes.cdll.LoadLibrary('libssl.so.10'))
- except OSError:
- try:
- dlls.append(ctypes.cdll.LoadLibrary('libssl.so.1.0.0'))
- except OSError:
- dlls.append(ctypes.cdll.LoadLibrary('libssl.so'))
+ dlls.append(ctypes.cdll.LoadLibrary('@openssl@/lib/libssl@ext@'))
class BIGNUM_Struct(ctypes.Structure):
--
2.35.1

View file

@ -0,0 +1,61 @@
{ lib
, stdenv
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
, substituteAll
, bcrypt
, pyopenssl
, python-gnupg
, pytestCheckHook
, requests
, openssl
}:
buildPythonPackage rec {
pname = "proton-client";
version = "0.7.1";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "ProtonMail";
repo = "proton-python-client";
rev = version;
sha256 = "sha256-mhPq9O/LCu3+E1jKlaJmrI8dxbA9BIwlc34qGwoxi5g=";
};
propagatedBuildInputs = [
bcrypt
pyopenssl
python-gnupg
requests
];
buildInputs = [ openssl ];
patches = [
# Patches library by fixing the openssl path
(substituteAll {
src = ./0001-OpenSSL-path-fix.patch;
openssl = openssl.out;
ext = stdenv.hostPlatform.extensions.sharedLibrary;
})
];
checkInputs = [ pytestCheckHook ];
disabledTests = [
#ValueError: Invalid modulus
"test_modulus_verification"
];
pythonImportsCheck = [ "proton" ];
meta = with lib; {
description = "Python Proton client module";
homepage = "https://github.com/ProtonMail/proton-python-client";
license = licenses.gpl3Only;
maintainers = with maintainers; [ wolfangaukang ];
platforms = platforms.linux;
};
}