at 23.11-beta 1.3 kB view raw
1{ lib 2, buildPythonPackage 3, fetchPypi 4, cmake 5, perl 6, stdenv 7, gcc10 8, CoreFoundation 9, Security 10, pythonOlder 11}: 12 13buildPythonPackage rec { 14 pname = "awscrt"; 15 version = "0.19.12"; 16 format = "setuptools"; 17 18 disabled = pythonOlder "3.7"; 19 20 src = fetchPypi { 21 inherit pname version; 22 hash = "sha256-skkkwtmSbGJV6MRBJMfNhu+pWEBuMkB7ozTh9wiyYVM="; 23 }; 24 25 buildInputs = lib.optionals stdenv.isDarwin [ 26 CoreFoundation 27 Security 28 ]; 29 30 # Required to suppress -Werror 31 # https://github.com/NixOS/nixpkgs/issues/39687 32 hardeningDisable = lib.optionals stdenv.cc.isClang [ 33 "strictoverflow" 34 ]; 35 36 # gcc <10 is not supported, LLVM on darwin is just fine 37 nativeBuildInputs = [ 38 cmake 39 ] ++ lib.optionals (!stdenv.isDarwin && stdenv.isAarch64) [ 40 gcc10 41 perl 42 ]; 43 44 dontUseCmakeConfigure = true; 45 46 pythonImportsCheck = [ 47 "awscrt" 48 ]; 49 50 # Unable to import test module 51 # https://github.com/awslabs/aws-crt-python/issues/281 52 doCheck = false; 53 54 meta = with lib; { 55 homepage = "https://github.com/awslabs/aws-crt-python"; 56 changelog = "https://github.com/awslabs/aws-crt-python/releases/tag/v${version}"; 57 description = "Python bindings for the AWS Common Runtime"; 58 license = licenses.asl20; 59 maintainers = with maintainers; [ davegallant ]; 60 }; 61}