about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/security/usbrip/default.nix
blob: 219a4315fd14786b1b6a577b74ab45bcf65affd0 (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
41
42
43
44
45
46
{ lib
, fetchFromGitHub
, python3
}:

python3.pkgs.buildPythonApplication rec {
  pname = "usbrip";
  version = "unstable-2021-07-02";

  disabled = python3.pythonOlder "3.6";

  src = fetchFromGitHub {
    owner = "snovvcrash";
    repo = pname;
    rev = "0f3701607ba13212ebefb4bbd9e68ec0e22d76ac";
    sha256 = "1vws8ybhv7szpqvlbmv0hrkys2fhhaa5bj9dywv3q2y1xmljl0py";
  };

  propagatedBuildInputs = with python3.pkgs; [
    termcolor
    terminaltables
    tqdm
  ];

  postPatch = ''
    # Remove install helpers which we don't need
    substituteInPlace setup.py \
      --replace "parse_requirements('requirements.txt')," "[]," \
      --replace "resolve('wheel')" "" \
      --replace "'install': LocalInstallCommand," ""
  '';

  # Project has no tests
  doCheck = false;

  pythonImportsCheck = [ "usbrip" ];

  meta = with lib; {
    description = "Tool to track the history of USB events";
    mainProgram = "usbrip";
    homepage = "https://github.com/snovvcrash/usbrip";
    license = with licenses; [ gpl3Plus ];
    maintainers = with maintainers; [ fab ];
    platforms = platforms.linux;
  };
}