11 rustPlatform.buildRustPackage rec {
15 src = fetchFromGitHub {
18 rev = "refs/tags/v${version}";
19 hash = "sha256-W5qZHPNfRe9RmsmRzA8xGPvLl6JCoVJ59N87p2ZnXGo=";
22 cargoHash = "sha256-ofmTDO11hqr95vSKRtJgMZL2BeA4AkCRNLknzr4n88I=";
24 nativeBuildInputs = [ cmake installShellFiles ];
26 postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
27 installShellCompletion --cmd yr \
28 --bash <($out/bin/yr completion bash) \
29 --fish <($out/bin/yr completion fish) \
30 --zsh <($out/bin/yr completion zsh)
33 passthru.tests.version = testers.testVersion {
38 description = "Tool to do pattern matching for malware research";
39 homepage = "https://virustotal.github.io/yara-x/";
40 changelog = "https://github.com/VirusTotal/yara-x/releases/tag/v${version}";
41 license = lib.licenses.bsd3;
42 maintainers = with lib.maintainers; [ fab lesuisse ];