Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / zlib-ng / default.nix
blob7cb498bbb12f924d6abc99dc245d17ee5101142e
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
5 # build-system
6 , cmake
7 , setuptools
9 # native dependencies
10 , zlib-ng
12 # tests
13 , pytestCheckHook
16 buildPythonPackage rec {
17   pname = "zlib-ng";
18   version = "0.4.1";
19   pyproject = true;
21   src = fetchFromGitHub {
22     owner = "pycompression";
23     repo = "python-zlib-ng";
24     rev = "v${version}";
25     hash = "sha256-uK6Md8ZOVUNwXCjzM4zTVr3WBwzLdnvT9n8yBvf968k=";
26   };
28   nativeBuildInputs = [
29     cmake
30     setuptools
31   ];
33   dontUseCmakeConfigure = true;
35   env.PYTHON_ZLIB_NG_LINK_DYNAMIC = true;
37   buildInputs = [
38     zlib-ng
39   ];
41   pythonImportsCheck = [
42     "zlib_ng"
43   ];
45   nativeCheckInputs = [
46     pytestCheckHook
47   ];
49   preCheck = ''
50     rm -rf src
51   '';
53   disabledTests = [
54     # commandline tests fail to find the built module
55     "test_compress_fast_best_are_exclusive"
56     "test_compress_infile_outfile"
57     "test_compress_infile_outfile_default"
58     "test_decompress_cannot_have_flags_compression"
59     "test_decompress_infile_outfile"
60     "test_decompress_infile_outfile_error"
61   ];
63   meta = with lib; {
64     description = "A drop-in replacement for Python's zlib and gzip modules using zlib-ng";
65     homepage = "https://github.com/pycompression/python-zlib-ng";
66     changelog = "https://github.com/pycompression/python-zlib-ng/blob/${src.rev}/CHANGELOG.rst";
67     license = licenses.psfl;
68     maintainers = with maintainers; [ hexa ];
69   };