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
|
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
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "cramjam";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "2.8.2";
|
|
|
|
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-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-BO35s7qOW4+l968I9qn9L1m2BtgRFNYUNlA7W1sctT8=";
|
2021-07-14 22:03:04 +00:00
|
|
|
};
|
|
|
|
|
2021-10-17 02:12:59 +00:00
|
|
|
cargoDeps = rustPlatform.fetchCargoTarball {
|
|
|
|
inherit src;
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-YWXf+ZDJLq6VxI5sa9G63fCPz2377BVSTmPM0mQSu8M=";
|
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
|
|
|
|
|
|
|
pytestFlagsArray = [
|
2024-04-21 15:54:59 +00:00
|
|
|
"cramjam-python/tests"
|
2023-01-20 10:41:00 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
disabledTestPaths = [
|
2024-04-21 15:54:59 +00:00
|
|
|
"cramjam-python/benchmarks/test_bench.py"
|
2023-01-20 10:41:00 +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 ];
|
|
|
|
};
|
|
|
|
}
|