mirror of
https://github.com/CHN-beta/nixpkgs.git
synced 2026-01-13 19:43:02 +08:00
Pcodec (or Pco) losslessly compresses and decompresses numerical sequences with high compression ratio and moderately fast speed. This adds the Python package.
58 lines
1.1 KiB
Nix
58 lines
1.1 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
rustPlatform,
|
|
pytestCheckHook,
|
|
|
|
numpy,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "pcodec";
|
|
version = "0.4.2";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "pcodec";
|
|
repo = "pcodec";
|
|
tag = "v${version}";
|
|
hash = "sha256-xWGtTtjMz62LnZDpBtp3HWPW9JgDovObUVSxWM3t1Ng=";
|
|
};
|
|
|
|
cargoDeps = rustPlatform.fetchCargoVendor {
|
|
inherit src;
|
|
name = "${pname}-${version}";
|
|
hash = "sha256-91p0eoVRzc9S8pHRhAlRey4k4jW9IMttiH+9Joh91IQ=";
|
|
};
|
|
|
|
buildAndTestSubdir = "pco_python";
|
|
|
|
dependencies = [ numpy ];
|
|
|
|
nativeBuildInputs = [
|
|
rustPlatform.cargoSetupHook
|
|
rustPlatform.maturinBuildHook
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
pytestCheckHook
|
|
];
|
|
|
|
pythonImportsCheck = [ "pcodec" ];
|
|
|
|
meta = {
|
|
description = "Lossless codec for numerical data";
|
|
homepage = "https://github.com/pcodec/pcodec";
|
|
changelog = "https://github.com/pcodec/pcodec/releases/tag/v${version}";
|
|
license = lib.licenses.asl20;
|
|
maintainers = with lib.maintainers; [
|
|
flokli
|
|
];
|
|
badPlatforms = [
|
|
# Illegal instruction: 4
|
|
"x86_64-darwin"
|
|
];
|
|
};
|
|
}
|