summary refs log tree commit diff
path: root/pkgs/development/python-modules/brotlicffi/default.nix
blob: 06cb2bf758058a0b8513a80865769dde679e29e2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
{ lib
, fetchFromGitHub
, buildPythonPackage
, pythonOlder
, cffi
, brotli
}:

buildPythonPackage rec {
  pname = "brotlicffi";
  version = "1.0.9.2";
  disabled = pythonOlder "3.6";

  src = fetchFromGitHub {
    owner = "python-hyper";
    repo = pname;
    rev = "v${version}";
    sha256 = "0qx7an7772brmx1rbbrqzqnkqqvicc70mx740nl31kzzyv4jjs00";
  };

  buildInputs = [
    brotli
  ];

  propagatedBuildInputs = [
    cffi
  ];

  preBuild = ''
    export USE_SHARED_BROTLI=1
  '';

  # Test data is not available, only when using libbortli git checkout
  doCheck = false;

  pythonImportsCheck = [ "brotlicffi" ];

  meta = with lib; {
    description = "Python CFFI bindings to the Brotli library";
    homepage = "https://github.com/python-hyper/brotlicffi";
    license = licenses.mit;
    maintainers = with maintainers; [ fab ];
  };
}