nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 setuptools,
6 cmake,
7 perl,
8 stdenv,
9}:
10
11buildPythonPackage (finalAttrs: {
12 pname = "awscrt";
13 version = "0.31.1";
14 pyproject = true;
15
16 src = fetchPypi {
17 inherit (finalAttrs) pname version;
18 hash = "sha256-q7ZHaNJb9WPajiFl1Hekkcuhi8IsTsjbesva6U5Z68Q=";
19 };
20
21 build-system = [ setuptools ];
22
23 nativeBuildInputs = [ cmake ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ perl ];
24
25 hardeningDisable = [ "fortify" ]; # needed for jitterentropy
26
27 dontUseCmakeConfigure = true;
28
29 pythonImportsCheck = [ "awscrt" ];
30
31 # Unable to import test module
32 # https://github.com/awslabs/aws-crt-python/issues/281
33 doCheck = false;
34
35 meta = {
36 homepage = "https://github.com/awslabs/aws-crt-python";
37 changelog = "https://github.com/awslabs/aws-crt-python/releases/tag/v${finalAttrs.version}";
38 description = "Python bindings for the AWS Common Runtime";
39 license = lib.licenses.asl20;
40 maintainers = with lib.maintainers; [ davegallant ];
41 };
42})