ansible-later: 2.0.22 -> 2.0.23
[NixPkgs.git] / pkgs / development / python-modules / awscrt / default.nix
blob85ce9deba6cfcf561ab3ce172fba7a515d534d25
1 { lib
2 , buildPythonPackage
3 , fetchPypi
4 , cmake
5 , perl
6 , stdenv
7 , gcc10
8 , CoreFoundation
9 , Security
10 , pythonOlder
13 buildPythonPackage rec {
14   pname = "awscrt";
15   version = "0.15.1";
16   format = "setuptools";
18   disabled = pythonOlder "3.7";
20   src = fetchPypi {
21     inherit pname version;
22     hash = "sha256-2VBdad9NL19eW2Djot2gkynyjSCUvG4f0KnEub6M0vg=";
23   };
25   buildInputs = lib.optionals stdenv.isDarwin [
26     CoreFoundation
27     Security
28   ];
30   # Required to suppress -Werror
31   # https://github.com/NixOS/nixpkgs/issues/39687
32   hardeningDisable = lib.optionals stdenv.cc.isClang [
33     "strictoverflow"
34   ];
36   postPatch = ''
37     substituteInPlace setup.py \
38       --replace "extra_link_args += ['-Wl,-fatal_warnings']" ""
39   '';
41   # gcc <10 is not supported, LLVM on darwin is just fine
42   nativeBuildInputs = [
43     cmake
44   ] ++ lib.optionals (!stdenv.isDarwin && stdenv.isAarch64) [
45     gcc10
46     perl
47   ];
49   dontUseCmakeConfigure = true;
51   pythonImportsCheck = [
52     "awscrt"
53   ];
55   # Unable to import test module
56   # https://github.com/awslabs/aws-crt-python/issues/281
57   doCheck = false;
59   meta = with lib; {
60     homepage = "https://github.com/awslabs/aws-crt-python";
61     description = "Python bindings for the AWS Common Runtime";
62     license = licenses.asl20;
63     maintainers = with maintainers; [ davegallant ];
64   };