Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 6 # build-system 7 cmake, 8 setuptools, 9 10 # native dependencies 11 zlib-ng, 12 13 # tests 14 pytestCheckHook, 15}: 16 17buildPythonPackage rec { 18 pname = "zlib-ng"; 19 version = "0.4.3"; 20 pyproject = true; 21 22 src = fetchFromGitHub { 23 owner = "pycompression"; 24 repo = "python-zlib-ng"; 25 rev = "v${version}"; 26 hash = "sha256-M0R39vUX3JMDEDJfsRzg1ipxbWJ/kl0FzW6ZUMXvGDs="; 27 }; 28 29 nativeBuildInputs = [ 30 cmake 31 setuptools 32 ]; 33 34 dontUseCmakeConfigure = true; 35 36 env.PYTHON_ZLIB_NG_LINK_DYNAMIC = true; 37 38 buildInputs = [ zlib-ng ]; 39 40 pythonImportsCheck = [ "zlib_ng" ]; 41 42 nativeCheckInputs = [ pytestCheckHook ]; 43 44 preCheck = '' 45 rm -rf src 46 ''; 47 48 disabledTests = [ 49 # commandline tests fail to find the built module 50 "test_compress_fast_best_are_exclusive" 51 "test_compress_infile_outfile" 52 "test_compress_infile_outfile_default" 53 "test_decompress_cannot_have_flags_compression" 54 "test_decompress_infile_outfile" 55 "test_decompress_infile_outfile_error" 56 ]; 57 58 meta = with lib; { 59 description = "Drop-in replacement for Python's zlib and gzip modules using zlib-ng"; 60 homepage = "https://github.com/pycompression/python-zlib-ng"; 61 changelog = "https://github.com/pycompression/python-zlib-ng/blob/${src.rev}/CHANGELOG.rst"; 62 license = licenses.psfl; 63 maintainers = with maintainers; [ hexa ]; 64 }; 65}