From 073a7a5d6ec5a69bd27771e6b9455acb96d384ea Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 21 May 2024 11:18:31 +0200 Subject: [PATCH 1/2] yara: refactor - add mainProgram - remove marketing buzz from description --- pkgs/tools/security/yara/default.nix | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/pkgs/tools/security/yara/default.nix b/pkgs/tools/security/yara/default.nix index 26eea76f016b..20c0ac63f66e 100644 --- a/pkgs/tools/security/yara/default.nix +++ b/pkgs/tools/security/yara/default.nix @@ -1,4 +1,5 @@ -{ lib, stdenv +{ lib +, stdenv , fetchFromGitHub , fetchpatch , autoreconfHook @@ -20,8 +21,8 @@ stdenv.mkDerivation rec { src = fetchFromGitHub { owner = "VirusTotal"; - repo = pname; - rev = "v${version}"; + repo = "yara"; + rev = "refs/tags/v${version}"; hash = "sha256-AecHsUBtBleUkWuYMQ4Tx/PY8cs9j7JwqncBziJD0hA="; }; @@ -64,10 +65,12 @@ stdenv.mkDerivation rec { doCheck = enableStatic; meta = with lib; { - description = "The pattern matching swiss knife for malware researchers"; + description = "Tool to perform pattern matching for malware-related tasks"; homepage = "http://Virustotal.github.io/yara/"; + changelog = "https://github.com/VirusTotal/yara/releases/tag/v${version}"; license = licenses.asl20; maintainers = with maintainers; [ fab ]; + mainProgram = "yara"; platforms = platforms.all; }; } From fc1676d2583d6f7cfad8ad93dbee833745f033a9 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 21 May 2024 11:19:45 +0200 Subject: [PATCH 2/2] yara: format with nixfmt --- pkgs/tools/security/yara/default.nix | 52 +++++++++++++++------------- 1 file changed, 27 insertions(+), 25 deletions(-) diff --git a/pkgs/tools/security/yara/default.nix b/pkgs/tools/security/yara/default.nix index 20c0ac63f66e..44b1544ab935 100644 --- a/pkgs/tools/security/yara/default.nix +++ b/pkgs/tools/security/yara/default.nix @@ -1,18 +1,22 @@ -{ lib -, stdenv -, fetchFromGitHub -, fetchpatch -, autoreconfHook -, pcre -, pkg-config -, protobufc -, withCrypto ? true, openssl -, enableCuckoo ? true, jansson -, enableDex ? true -, enableDotNet ? true -, enableMacho ? true -, enableMagic ? true, file -, enableStatic ? false +{ + lib, + stdenv, + fetchFromGitHub, + fetchpatch, + autoreconfHook, + pcre, + pkg-config, + protobufc, + withCrypto ? true, + openssl, + enableCuckoo ? true, + jansson, + enableDex ? true, + enableDotNet ? true, + enableMacho ? true, + enableMagic ? true, + file, + enableStatic ? false, }: stdenv.mkDerivation rec { @@ -39,16 +43,14 @@ stdenv.mkDerivation rec { pkg-config ]; - buildInputs = [ - pcre - protobufc - ] ++ lib.optionals withCrypto [ - openssl - ] ++ lib.optionals enableMagic [ - file - ] ++ lib.optionals enableCuckoo [ - jansson - ]; + buildInputs = + [ + pcre + protobufc + ] + ++ lib.optionals withCrypto [ openssl ] + ++ lib.optionals enableMagic [ file ] + ++ lib.optionals enableCuckoo [ jansson ]; preConfigure = "./bootstrap.sh";