about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/karton-mwdb-reporter/default.nix
blob: 68b28bffe6facb52e6df24c077ac38544ab3f3aa (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
{ lib
, buildPythonPackage
, fetchFromGitHub
, karton-core
, mwdblib
}:

buildPythonPackage rec {
  pname = "karton-mwdb-reporter";
  version = "1.0.0";

  src = fetchFromGitHub {
    owner = "CERT-Polska";
    repo = pname;
    rev = "v${version}";
    sha256 = "0ks8jrc4v87q6zhwqg40w6xv2wfkzslmnfmsmmkfjj8mak8nk70f";
  };

  propagatedBuildInputs = [
    karton-core
    mwdblib
  ];

  postPatch = ''
    substituteInPlace requirements.txt \
      --replace "karton-core==4.0.4" "karton-core" \
      --replace "mwdblib==3.3.1" "mwdblib"
  '';

  # Project has no tests
  doCheck = false;
  pythonImportsCheck = [ "karton.mwdb_reporter" ];

  meta = with lib; {
    description = "Karton service that uploads analyzed artifacts and metadata to MWDB Core";
    homepage = "https://github.com/CERT-Polska/karton-mwdb-reporter";
    license = with licenses; [ bsd3 ];
    maintainers = with maintainers; [ fab ];
  };
}