Files
nixpkgs/pkgs/development/python-modules/yara-x/default.nix
Fabian Affolter 19cb164cda python313Packages.yara-x: modernize
Updated changelog URL to reflect correct version tag.
2025-10-10 01:37:10 +02:00

48 lines
1.0 KiB
Nix

{
lib,
buildPythonPackage,
rustPlatform,
fetchFromGitHub,
pytestCheckHook,
pkgs,
}:
buildPythonPackage rec {
pname = "yara-x";
version = "1.8.1";
pyproject = true;
src = fetchFromGitHub {
owner = "VirusTotal";
repo = "yara-x";
tag = "v${version}";
hash = "sha256-dl2uxMo81K2ZEAfZk2OP0FXTY4lKGmzqZe0QQo/YIsA=";
};
buildAndTestSubdir = "py";
cargoDeps = rustPlatform.fetchCargoVendor {
inherit pname src version;
hash = "sha256-+Bva1uch6fd6gl2MH2ss3S6Ea1QkvgVePhdUVUDuIE8=";
};
nativeBuildInputs = [
rustPlatform.cargoSetupHook
rustPlatform.maturinBuildHook
];
buildInputs = [ pkgs.yara-x ];
pythonImportsCheck = [ "yara_x" ];
nativeCheckInputs = [ pytestCheckHook ];
meta = {
description = "Official Python library for YARA-X";
homepage = "https://github.com/VirusTotal/yara-x/tree/main/py";
changelog = "https://github.com/VirusTotal/yara-x/tree/${src.tag}/py";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ ivyfanchiang ];
};
}