chromium,chromedriver: 129.0.6668.91 -> 129.0.6668.100
[NixPkgs.git] / pkgs / by-name / ya / yara-x / package.nix
blob1bf147df8373833a0c86c3395fbf3f1afbafd4f0
1 { lib
2 , stdenv
3 , fetchFromGitHub
4 , rustPlatform
5 , cmake
6 , installShellFiles
7 , testers
8 , yara-x
9 }:
11 rustPlatform.buildRustPackage rec {
12   pname = "yara-x";
13   version = "0.9.0";
15   src = fetchFromGitHub {
16     owner = "VirusTotal";
17     repo = "yara-x";
18     rev = "refs/tags/v${version}";
19     hash = "sha256-W5qZHPNfRe9RmsmRzA8xGPvLl6JCoVJ59N87p2ZnXGo=";
20   };
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)
31   '';
33   passthru.tests.version = testers.testVersion {
34     package = yara-x;
35   };
37   meta = {
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 ];
43     mainProgram = "yr";
44   };