1{
2 lib,
3 buildPythonPackage,
4 cryptography,
5 fetchPypi,
6 fetchpatch,
7 poetry-core,
8 pyopenssl,
9 pytestCheckHook,
10 pythonOlder,
11}:
12
13buildPythonPackage rec {
14 pname = "josepy";
15 version = "1.14.0";
16 pyproject = true;
17
18 disabled = pythonOlder "3.7";
19
20 src = fetchPypi {
21 inherit pname version;
22 hash = "sha256-MIs7+c6CWtTUu6djcs8ZtdwcLOlqnSmPlkKXXmS9E90=";
23 };
24
25 patches = [
26 # don't fail tests on openssl deprecation warning, upstream is working on proper fix
27 # FIXME: remove for next update
28 (fetchpatch {
29 url = "https://github.com/certbot/josepy/commit/350410fc1d38c4ac8422816b6865ac8cd9c60fc7.diff";
30 hash = "sha256-QGbzonXb5BtTTWDeDqnZhbS6gHce99vIOm/H8QYeGXY=";
31 })
32 ];
33
34 nativeBuildInputs = [ poetry-core ];
35
36 propagatedBuildInputs = [
37 pyopenssl
38 cryptography
39 ];
40
41 nativeCheckInputs = [ pytestCheckHook ];
42
43 pythonImportsCheck = [ "josepy" ];
44
45 meta = with lib; {
46 changelog = "https://github.com/certbot/josepy/blob/v${version}/CHANGELOG.rst";
47 description = "JOSE protocol implementation in Python";
48 mainProgram = "jws";
49 homepage = "https://github.com/certbot/josepy";
50 license = licenses.asl20;
51 maintainers = with maintainers; [ dotlambda ];
52 };
53}