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
|
|
|
|
, lz4
|
|
|
|
, memory_profiler
|
|
|
|
, numpy
|
|
|
|
, 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";
|
2021-10-17 02:12:59 +00:00
|
|
|
version = "2.4.0";
|
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";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "sha256-00KvbiTf8PxYWljLKTRZmPIAbb+PnBleDM4p0AzZhHw=";
|
2021-07-14 22:03:04 +00:00
|
|
|
};
|
|
|
|
|
2021-10-17 02:12:59 +00:00
|
|
|
cargoDeps = rustPlatform.fetchCargoTarball {
|
|
|
|
inherit src;
|
|
|
|
sha256 = "sha256-4y/jeEZjVUbaXtBx5l3Hrbnj3iNYX089K4xexRP+5v0=";
|
2021-07-14 22:03:04 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = with rustPlatform; [
|
|
|
|
cargoSetupHook
|
|
|
|
maturinBuildHook
|
|
|
|
];
|
|
|
|
buildInputs = lib.optional stdenv.isDarwin libiconv;
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
brotli
|
|
|
|
lz4
|
|
|
|
memory_profiler
|
|
|
|
numpy
|
|
|
|
pytest-benchmark
|
2021-10-17 02:12:59 +00:00
|
|
|
pytestCheckHook
|
2021-07-14 22:03:04 +00:00
|
|
|
python-snappy
|
|
|
|
zstd
|
|
|
|
];
|
|
|
|
pytestFlagsArray = [ "--benchmark-disable" ];
|
|
|
|
pythonImportsCheck = [ "cramjam" ];
|
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|