2024-05-15 15:35:15 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
rustPlatform,
|
|
|
|
stdenv,
|
|
|
|
libiconv,
|
|
|
|
hypothesis,
|
|
|
|
numpy,
|
|
|
|
pytest-xdist,
|
|
|
|
pytestCheckHook,
|
2021-07-14 22:03:04 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "cramjam";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "2.8.3";
|
2024-04-21 15:54:59 +00:00
|
|
|
pyproject = true;
|
2021-07-14 22:03:04 +00:00
|
|
|
|
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}";
|
2024-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-1KD5/oZjfdXav1ZByQoyyiDSzbmY4VJsSJg/FtUFdDE=";
|
2021-07-14 22:03:04 +00:00
|
|
|
};
|
|
|
|
|
2021-10-17 02:12:59 +00:00
|
|
|
cargoDeps = rustPlatform.fetchCargoTarball {
|
|
|
|
inherit src;
|
2024-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-Bp7EtyuLdLUfU3yvouNVE42klfqYt9QOwt+iGe521yI=";
|
2021-07-14 22:03:04 +00:00
|
|
|
};
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
buildAndTestSubdir = "cramjam-python";
|
|
|
|
|
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 = [
|
2023-01-20 10:41:00 +00:00
|
|
|
hypothesis
|
2021-07-14 22:03:04 +00:00
|
|
|
numpy
|
2024-04-21 15:54:59 +00:00
|
|
|
pytest-xdist
|
2021-10-17 02:12:59 +00:00
|
|
|
pytestCheckHook
|
2021-07-14 22:03:04 +00:00
|
|
|
];
|
2023-01-20 10:41:00 +00:00
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
pytestFlagsArray = [ "cramjam-python/tests" ];
|
2023-01-20 10:41:00 +00:00
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
disabledTestPaths = [ "cramjam-python/benchmarks/test_bench.py" ];
|
2023-01-20 10:41:00 +00:00
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|