1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, pytestCheckHook }:
5
6buildPythonPackage rec {
7 pname = "brotli";
8 version = "1.0.9";
9
10 # PyPI doesn't contain tests so let's use GitHub
11 src = fetchFromGitHub {
12 owner = "google";
13 repo = pname;
14 rev = "v${version}";
15 sha256 = "1rdp9rx197q467ixp53g4cgc3jbsdaxr62pz0a8ayv2lvm944azh";
16 # for some reason, the test data isn't captured in releases, force a git checkout
17 deepClone = true;
18 };
19
20 dontConfigure = true;
21
22 checkInputs = [
23 pytestCheckHook
24 ];
25
26 pytestFlagsArray = [
27 "python/tests"
28 ];
29
30 meta = with lib; {
31 homepage = "https://github.com/google/brotli";
32 description = "Generic-purpose lossless compression algorithm";
33 license = licenses.mit;
34 maintainers = with maintainers; [ ];
35 };
36}