nixpkgs/pkgs/development/python-modules/brotli/default.nix

31 lines
719 B
Nix
Raw Normal View History

2018-09-12 07:35:06 +00:00
{ lib, buildPythonPackage, fetchFromGitHub, pytest }:
buildPythonPackage rec {
pname = "brotli";
2021-03-24 17:41:46 +00:00
version = "1.0.9";
2018-09-12 07:35:06 +00:00
# PyPI doesn't contain tests so let's use GitHub
src = fetchFromGitHub {
owner = "google";
repo = pname;
rev = "v${version}";
2021-03-24 18:10:38 +00:00
sha256 = "1rdp9rx197q467ixp53g4cgc3jbsdaxr62pz0a8ayv2lvm944azh";
# for some reason, the test data isn't captured in releases, force a git checkout
deepClone = true;
2018-09-12 07:35:06 +00:00
};
dontConfigure = true;
2018-09-12 07:35:06 +00:00
checkInputs = [ pytest ];
checkPhase = ''
pytest python/tests
'';
meta = {
homepage = "https://github.com/google/brotli";
2018-09-12 07:35:06 +00:00
description = "Generic-purpose lossless compression algorithm";
license = lib.licenses.mit;
};
}