From c8da86f45f472543f8b23823b1c0e7afd0b3261b Mon Sep 17 00:00:00 2001 From: Thomas Gerbet Date: Mon, 20 May 2024 21:32:31 +0200 Subject: [PATCH 1/2] yara-x: init at 0.3.0 Announcement blogpost: https://virustotal.github.io/yara-x/blog/yara-is-dead-long-live-yara-x/ --- pkgs/by-name/ya/yara-x/package.nix | 44 ++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 pkgs/by-name/ya/yara-x/package.nix diff --git a/pkgs/by-name/ya/yara-x/package.nix b/pkgs/by-name/ya/yara-x/package.nix new file mode 100644 index 000000000000..18ea5fa58a1a --- /dev/null +++ b/pkgs/by-name/ya/yara-x/package.nix @@ -0,0 +1,44 @@ +{ lib +, fetchFromGitHub +, rustPlatform +, cmake +, installShellFiles +, testers +, yara-x +}: + +rustPlatform.buildRustPackage rec { + pname = "yara-x"; + version = "0.3.0"; + + src = fetchFromGitHub { + owner = "VirusTotal"; + repo = "yara-x"; + rev = "refs/tags/v${version}"; + hash = "sha256-AFRKsBNDgjIsLnr61ME4WvDj+DsvIhFUnDmOGn3So8o="; + }; + + cargoHash = "sha256-cZ/bWaTNnX9+o8D5lMu72snc4CLpjqcwjintbw59OXA="; + + nativeBuildInputs = [ cmake installShellFiles ]; + + postInstall = '' + installShellCompletion --cmd yr \ + --bash <($out/bin/yr completion bash) \ + --fish <($out/bin/yr completion fish) \ + --zsh <($out/bin/yr completion zsh) + ''; + + passthru.tests.version = testers.testVersion { + package = yara-x; + }; + + meta = { + description = "Tool to do pattern matching for malware research"; + homepage = "https://virustotal.github.io/yara-x/"; + changelog = "https://github.com/VirusTotal/yara-x/releases/tag/v${version}"; + license = lib.licenses.bsd3; + maintainers = with lib.maintainers; [ lesuisse ]; + mainProgram = "yr"; + }; +} From ea3f18fe96e4aa0049387f4e059bec871fbd0ba1 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 21 May 2024 23:17:02 +0200 Subject: [PATCH 2/2] yara-x: add myself as additional maintainer --- pkgs/by-name/ya/yara-x/package.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/by-name/ya/yara-x/package.nix b/pkgs/by-name/ya/yara-x/package.nix index 18ea5fa58a1a..80789fa99123 100644 --- a/pkgs/by-name/ya/yara-x/package.nix +++ b/pkgs/by-name/ya/yara-x/package.nix @@ -38,7 +38,7 @@ rustPlatform.buildRustPackage rec { homepage = "https://virustotal.github.io/yara-x/"; changelog = "https://github.com/VirusTotal/yara-x/releases/tag/v${version}"; license = lib.licenses.bsd3; - maintainers = with lib.maintainers; [ lesuisse ]; + maintainers = with lib.maintainers; [ fab lesuisse ]; mainProgram = "yr"; }; }