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.

75 lines
1.3 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
, hypothesis
2021-05-29 09:14:36 +00:00
, lz4
, memory_profiler
, numpy
, py
2021-05-29 09:14:36 +00:00
, pytest-benchmark
, pytestCheckHook
2021-05-29 09:14:36 +00:00
, python-snappy
, zstd
}:
buildPythonPackage rec {
pname = "cramjam";
version = "2.6.2.post1";
2021-05-29 09:14:36 +00:00
format = "pyproject";
src = fetchFromGitHub {
owner = "milesgranger";
repo = "pyrus-cramjam";
rev = "refs/tags/v${version}";
hash = "sha256-KU1JVNEQJadXNiIWTvI33N2NSq994xoKxcAGGezFjaI=";
2021-05-29 09:14:36 +00:00
};
cargoDeps = rustPlatform.fetchCargoTarball {
inherit src;
hash = "sha256-w1bEf+etLgR/YOyLmC3lFtO9fqAx8z2aul/XIKUQb5k=";
2021-05-29 09:14:36 +00:00
};
nativeBuildInputs = with rustPlatform; [
cargoSetupHook
maturinBuildHook
];
2021-05-29 09:14:36 +00:00
buildInputs = lib.optional stdenv.isDarwin libiconv;
nativeCheckInputs = [
2021-05-29 09:14:36 +00:00
brotli
hypothesis
2021-05-29 09:14:36 +00:00
lz4
memory_profiler
numpy
py
2021-05-29 09:14:36 +00:00
pytest-benchmark
pytestCheckHook
2021-05-29 09:14:36 +00:00
python-snappy
zstd
];
pytestFlagsArray = [
"--benchmark-disable"
];
disabledTestPaths = [
"benchmarks/test_bench.py"
];
pythonImportsCheck = [
"cramjam"
];
2021-05-29 09:14:36 +00:00
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 ];
};
}