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