1{ lib, buildPythonPackage, fetchFromGitHub, pytest }:
2
3buildPythonPackage rec {
4 pname = "brotli";
5 version = "1.0.7";
6
7 # PyPI doesn't contain tests so let's use GitHub
8 src = fetchFromGitHub {
9 owner = "google";
10 repo = pname;
11 rev = "v${version}";
12 sha256 = "1811b55wdfg4kbsjcgh1kc938g118jpvif97ilgrmbls25dfpvvw";
13 };
14
15 checkInputs = [ pytest ];
16
17 checkPhase = ''
18 pytest python/tests
19 '';
20
21 meta = {
22 homepage = https://github.com/google/brotli;
23 description = "Generic-purpose lossless compression algorithm";
24 license = lib.licenses.mit;
25 };
26}