1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 cmake,
6 perl,
7 stdenv,
8 CoreFoundation,
9 Security,
10 pythonOlder,
11}:
12
13buildPythonPackage rec {
14 pname = "awscrt";
15 version = "0.23.0";
16 format = "setuptools";
17
18 disabled = pythonOlder "3.7";
19
20 src = fetchPypi {
21 inherit pname version;
22 hash = "sha256-/fV2FX2CMt3jjpnJ4XjhfWVa1yWmWna7eYO/6npPxig=";
23 };
24
25 buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
26 CoreFoundation
27 Security
28 ];
29
30 nativeBuildInputs = [ cmake ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ perl ];
31
32 dontUseCmakeConfigure = true;
33
34 pythonImportsCheck = [ "awscrt" ];
35
36 # Unable to import test module
37 # https://github.com/awslabs/aws-crt-python/issues/281
38 doCheck = false;
39
40 meta = with lib; {
41 homepage = "https://github.com/awslabs/aws-crt-python";
42 changelog = "https://github.com/awslabs/aws-crt-python/releases/tag/v${version}";
43 description = "Python bindings for the AWS Common Runtime";
44 license = licenses.asl20;
45 maintainers = with maintainers; [ davegallant ];
46 };
47}