depot/third_party/nixpkgs/pkgs/development/python-modules/lzallright/default.nix
Default email 7e47f3658e Project import generated by Copybara.
GitOrigin-RevId: 1925c603f17fc89f4c8f6bf6f631a802ad85d784
2024-09-26 11:04:55 +00:00

54 lines
1.1 KiB
Nix

{
lib,
stdenv,
buildPythonPackage,
callPackage,
fetchFromGitHub,
rustPlatform,
libiconv,
}:
buildPythonPackage rec {
pname = "lzallright";
version = "0.2.4";
src = fetchFromGitHub {
owner = "vlaci";
repo = pname;
rev = "v${version}";
hash = "sha256-6Dez14qlZ7cnVQfaiTHGuiTSAHvBoKtolgKF7ne9ASw=";
};
cargoDeps = rustPlatform.fetchCargoTarball {
inherit src;
name = "${pname}-${version}";
hash = "sha256-ZYFAWkcDdX10024hc+gdARyaJFpNNcXf+gGLxBP5VlA=";
};
format = "pyproject";
nativeBuildInputs = with rustPlatform; [
cargoSetupHook
maturinBuildHook
];
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ];
pythonImportsCheck = [ "lzallright" ];
doCheck = false;
passthru.tests = {
pytest = callPackage ./tests.nix { };
};
meta = with lib; {
description = ''
A Python 3.8+ binding for lzokay library which is an MIT licensed
a minimal, C++14 implementation of the LZO compression format.
'';
homepage = "https://github.com/vlaci/lzallright";
license = licenses.mit;
maintainers = with maintainers; [ vlaci ];
};
}