1{ lib
2, stdenv
3, fetchFromGitHub
4, makeWrapper
5, coreutils
6, bashInteractive
7}:
8
9stdenv.mkDerivation rec {
10 version = "0.2.0";
11 pname = "yallback";
12 src = fetchFromGitHub {
13 owner = "abathur";
14 repo = "yallback";
15 rev = "v${version}";
16 hash = "sha256-t+fdnDJMFiFqN23dSY3TnsZsIDcravtwdNKJ5MiZosE=";
17 };
18
19 buildInputs = [ coreutils bashInteractive ];
20 nativeBuildInputs = [ makeWrapper ];
21
22 installPhase = ''
23 install -Dv yallback $out/bin/yallback
24 wrapProgram $out/bin/yallback --prefix PATH : ${lib.makeBinPath [ coreutils ]}
25 '';
26
27 meta = with lib; {
28 description = "Callbacks for YARA rule matches";
29 mainProgram = "yallback";
30 homepage = "https://github.com/abathur/yallback";
31 license = licenses.mit;
32 maintainers = with maintainers; [ abathur ];
33 platforms = platforms.all;
34 };
35}