nixpkgs/pkgs/development/python-modules/cramjam/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

60 lines
1.2 KiB
Nix
Raw Normal View History

2021-05-29 09:14:36 +00:00
{ lib
, buildPythonPackage
, fetchFromGitHub
2021-05-29 09:14:36 +00:00
, rustPlatform
, stdenv
2021-05-29 09:14:36 +00:00
, libiconv
, brotli
, lz4
, memory_profiler
, numpy
, pytest-benchmark
, pytestCheckHook
2021-05-29 09:14:36 +00:00
, python-snappy
, zstd
}:
buildPythonPackage rec {
pname = "cramjam";
version = "2.4.0";
2021-05-29 09:14:36 +00:00
format = "pyproject";
src = fetchFromGitHub {
owner = "milesgranger";
repo = "pyrus-cramjam";
rev = "v${version}";
sha256 = "sha256-00KvbiTf8PxYWljLKTRZmPIAbb+PnBleDM4p0AzZhHw=";
2021-05-29 09:14:36 +00:00
};
cargoDeps = rustPlatform.fetchCargoTarball {
inherit src;
sha256 = "sha256-4y/jeEZjVUbaXtBx5l3Hrbnj3iNYX089K4xexRP+5v0=";
2021-05-29 09:14:36 +00:00
};
nativeBuildInputs = with rustPlatform; [
cargoSetupHook
maturinBuildHook
];
buildInputs = lib.optional stdenv.isDarwin libiconv;
checkInputs = [
brotli
lz4
memory_profiler
numpy
pytest-benchmark
pytestCheckHook
2021-05-29 09:14:36 +00:00
python-snappy
zstd
];
pytestFlagsArray = [ "--benchmark-disable" ];
pythonImportsCheck = [ "cramjam" ];
meta = with lib; {
description = "Thin Python bindings to de/compression algorithms in Rust";
homepage = "https://github.com/milesgranger/pyrus-cramjam";
2021-05-29 09:14:36 +00:00
license = with licenses; [ mit ];
maintainers = with maintainers; [ veprbl ];
};
}