2021-07-14 22:03:04 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2021-10-17 02:12:59 +00:00
|
|
|
, fetchFromGitHub
|
2021-07-14 22:03:04 +00:00
|
|
|
, rustPlatform
|
2021-10-17 02:12:59 +00:00
|
|
|
, stdenv
|
2021-07-14 22:03:04 +00:00
|
|
|
, libiconv
|
|
|
|
, brotli
|
2023-01-20 10:41:00 +00:00
|
|
|
, hypothesis
|
2021-07-14 22:03:04 +00:00
|
|
|
, lz4
|
2023-10-19 13:55:26 +00:00
|
|
|
, memory-profiler
|
2021-07-14 22:03:04 +00:00
|
|
|
, numpy
|
2023-01-20 10:41:00 +00:00
|
|
|
, py
|
2021-07-14 22:03:04 +00:00
|
|
|
, pytest-benchmark
|
2021-10-17 02:12:59 +00:00
|
|
|
, pytestCheckHook
|
2021-07-14 22:03:04 +00:00
|
|
|
, python-snappy
|
|
|
|
, zstd
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "cramjam";
|
2023-01-20 10:41:00 +00:00
|
|
|
version = "2.6.2.post1";
|
2021-07-14 22:03:04 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
2021-10-17 02:12:59 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "milesgranger";
|
|
|
|
repo = "pyrus-cramjam";
|
2023-01-20 10:41:00 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-KU1JVNEQJadXNiIWTvI33N2NSq994xoKxcAGGezFjaI=";
|
2021-07-14 22:03:04 +00:00
|
|
|
};
|
|
|
|
|
2021-10-17 02:12:59 +00:00
|
|
|
cargoDeps = rustPlatform.fetchCargoTarball {
|
|
|
|
inherit src;
|
2023-01-20 10:41:00 +00:00
|
|
|
hash = "sha256-w1bEf+etLgR/YOyLmC3lFtO9fqAx8z2aul/XIKUQb5k=";
|
2021-07-14 22:03:04 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = with rustPlatform; [
|
|
|
|
cargoSetupHook
|
|
|
|
maturinBuildHook
|
|
|
|
];
|
2023-01-20 10:41:00 +00:00
|
|
|
|
2021-07-14 22:03:04 +00:00
|
|
|
buildInputs = lib.optional stdenv.isDarwin libiconv;
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-07-14 22:03:04 +00:00
|
|
|
brotli
|
2023-01-20 10:41:00 +00:00
|
|
|
hypothesis
|
2021-07-14 22:03:04 +00:00
|
|
|
lz4
|
2023-10-19 13:55:26 +00:00
|
|
|
memory-profiler
|
2021-07-14 22:03:04 +00:00
|
|
|
numpy
|
2023-01-20 10:41:00 +00:00
|
|
|
py
|
2021-07-14 22:03:04 +00:00
|
|
|
pytest-benchmark
|
2021-10-17 02:12:59 +00:00
|
|
|
pytestCheckHook
|
2021-07-14 22:03:04 +00:00
|
|
|
python-snappy
|
|
|
|
zstd
|
|
|
|
];
|
2023-01-20 10:41:00 +00:00
|
|
|
|
|
|
|
pytestFlagsArray = [
|
|
|
|
"--benchmark-disable"
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTestPaths = [
|
|
|
|
"benchmarks/test_bench.py"
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"cramjam"
|
|
|
|
];
|
2021-07-14 22:03:04 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Thin Python bindings to de/compression algorithms in Rust";
|
2021-10-17 02:12:59 +00:00
|
|
|
homepage = "https://github.com/milesgranger/pyrus-cramjam";
|
2021-07-14 22:03:04 +00:00
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ veprbl ];
|
|
|
|
};
|
|
|
|
}
|