Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / cramjam / default.nix
blob03d823812c15da0936622c91aa054cd58da4b7df
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , rustPlatform
5 , stdenv
6 , libiconv
7 , brotli
8 , hypothesis
9 , lz4
10 , memory-profiler
11 , numpy
12 , py
13 , pytest-benchmark
14 , pytestCheckHook
15 , python-snappy
16 , zstd
19 buildPythonPackage rec {
20   pname = "cramjam";
21   version = "2.6.2.post1";
22   format = "pyproject";
24   src = fetchFromGitHub {
25     owner = "milesgranger";
26     repo = "pyrus-cramjam";
27     rev = "refs/tags/v${version}";
28     hash = "sha256-KU1JVNEQJadXNiIWTvI33N2NSq994xoKxcAGGezFjaI=";
29   };
31   cargoDeps = rustPlatform.fetchCargoTarball {
32     inherit src;
33     hash = "sha256-w1bEf+etLgR/YOyLmC3lFtO9fqAx8z2aul/XIKUQb5k=";
34   };
36   nativeBuildInputs = with rustPlatform; [
37     cargoSetupHook
38     maturinBuildHook
39   ];
41   buildInputs = lib.optional stdenv.isDarwin libiconv;
43   nativeCheckInputs = [
44     brotli
45     hypothesis
46     lz4
47     memory-profiler
48     numpy
49     py
50     pytest-benchmark
51     pytestCheckHook
52     python-snappy
53     zstd
54   ];
56   pytestFlagsArray = [
57     "--benchmark-disable"
58   ];
60   disabledTestPaths = [
61     "benchmarks/test_bench.py"
62   ];
64   pythonImportsCheck = [
65     "cramjam"
66   ];
68   meta = with lib; {
69     description = "Thin Python bindings to de/compression algorithms in Rust";
70     homepage = "https://github.com/milesgranger/pyrus-cramjam";
71     license = with licenses; [ mit ];
72     maintainers = with maintainers; [ veprbl ];
73   };