Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 21.05 30 lines 719 B view raw
1{ lib, buildPythonPackage, fetchFromGitHub, pytest }: 2 3buildPythonPackage rec { 4 pname = "brotli"; 5 version = "1.0.9"; 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 = "1rdp9rx197q467ixp53g4cgc3jbsdaxr62pz0a8ayv2lvm944azh"; 13 # for some reason, the test data isn't captured in releases, force a git checkout 14 deepClone = true; 15 }; 16 17 dontConfigure = true; 18 19 checkInputs = [ pytest ]; 20 21 checkPhase = '' 22 pytest python/tests 23 ''; 24 25 meta = { 26 homepage = "https://github.com/google/brotli"; 27 description = "Generic-purpose lossless compression algorithm"; 28 license = lib.licenses.mit; 29 }; 30}