1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, karton-core
5, python
6, yara-python
7}:
8
9buildPythonPackage rec {
10 pname = "karton-yaramatcher";
11 version = "1.1.1";
12
13 src = fetchFromGitHub {
14 owner = "CERT-Polska";
15 repo = pname;
16 rev = "v${version}";
17 sha256 = "0mv8v1gk6p21pw9kx6cxr76l6c5fxd3p6dk85cwfzz100h8mdvar";
18 };
19
20 propagatedBuildInputs = [
21 karton-core
22 yara-python
23 ];
24
25 checkPhase = ''
26 runHook preCheck
27 ${python.interpreter} -m unittest discover
28 runHook postCheck
29 '';
30
31 pythonImportsCheck = [ "karton.yaramatcher" ];
32
33 meta = with lib; {
34 description = "File and analysis artifacts yara matcher for the Karton framework";
35 homepage = "https://github.com/CERT-Polska/karton-yaramatcher";
36 license = with licenses; [ bsd3 ];
37 maintainers = with maintainers; [ fab ];
38 };
39}