2020-04-24 23:36:52 +00:00
|
|
|
{ lib, buildPythonPackage, fetchFromGitHub, pytest }:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "brotli";
|
2021-04-26 19:14:03 +00:00
|
|
|
version = "1.0.9";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# PyPI doesn't contain tests so let's use GitHub
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "google";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-04-26 19:14:03 +00:00
|
|
|
sha256 = "1rdp9rx197q467ixp53g4cgc3jbsdaxr62pz0a8ayv2lvm944azh";
|
|
|
|
# for some reason, the test data isn't captured in releases, force a git checkout
|
|
|
|
deepClone = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
dontConfigure = true;
|
|
|
|
|
|
|
|
checkInputs = [ pytest ];
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
pytest python/tests
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = "https://github.com/google/brotli";
|
|
|
|
description = "Generic-purpose lossless compression algorithm";
|
|
|
|
license = lib.licenses.mit;
|
|
|
|
};
|
|
|
|
}
|