1{
2 lib,
3 fetchFromGitHub,
4 python3,
5}:
6
7python3.pkgs.buildPythonApplication {
8 pname = "usbrip";
9 version = "0-unstable-2021-07-02";
10 pyproject = true;
11
12 disabled = python3.pythonOlder "3.6";
13
14 src = fetchFromGitHub {
15 owner = "snovvcrash";
16 repo = "usbrip";
17 rev = "0f3701607ba13212ebefb4bbd9e68ec0e22d76ac";
18 sha256 = "1vws8ybhv7szpqvlbmv0hrkys2fhhaa5bj9dywv3q2y1xmljl0py";
19 };
20
21 build-system = with python3.pkgs; [ setuptools ];
22
23 dependencies = with python3.pkgs; [
24 termcolor
25 terminaltables
26 tqdm
27 ];
28
29 postPatch = ''
30 # Remove install helpers which we don't need
31 substituteInPlace setup.py \
32 --replace-fail "resolve('wheel')" "" \
33 --replace-fail "'install': LocalInstallCommand," ""
34 '';
35
36 # Project has no tests
37 doCheck = false;
38
39 pythonImportsCheck = [ "usbrip" ];
40
41 meta = with lib; {
42 description = "Tool to track the history of USB events";
43 mainProgram = "usbrip";
44 homepage = "https://github.com/snovvcrash/usbrip";
45 license = with licenses; [ gpl3Plus ];
46 maintainers = with maintainers; [ fab ];
47 platforms = platforms.linux;
48 };
49}