nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at haskell-updates 50 lines 1.1 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 rustPlatform, 5 fetchFromGitHub, 6 pytestCheckHook, 7 pkgs, 8}: 9 10buildPythonPackage rec { 11 pname = "yara-x"; 12 version = "1.14.0"; 13 pyproject = true; 14 15 src = fetchFromGitHub { 16 owner = "VirusTotal"; 17 repo = "yara-x"; 18 tag = "v${version}"; 19 hash = "sha256-gGkBmJoUa9WiIozSwhe18N8i5uSiKsSQ3J1NAT41ro4="; 20 }; 21 22 buildAndTestSubdir = "py"; 23 24 cargoDeps = rustPlatform.fetchCargoVendor { 25 inherit pname src version; 26 hash = "sha256-j+sIxYPvkI1EnAN7LcBoS4m04rYdKlK48tGO0uFa7KU="; 27 }; 28 29 nativeBuildInputs = [ 30 rustPlatform.cargoSetupHook 31 rustPlatform.maturinBuildHook 32 ]; 33 34 buildInputs = [ pkgs.yara-x ]; 35 36 pythonImportsCheck = [ "yara_x" ]; 37 38 nativeCheckInputs = [ pytestCheckHook ]; 39 40 meta = { 41 description = "Official Python library for YARA-X"; 42 homepage = "https://github.com/VirusTotal/yara-x/tree/main/py"; 43 changelog = "https://github.com/VirusTotal/yara-x/tree/${src.tag}/py"; 44 license = lib.licenses.bsd3; 45 maintainers = with lib.maintainers; [ 46 ivyfanchiang 47 lesuisse 48 ]; 49 }; 50}