1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 python,
6 pyusb,
7}:
8
9buildPythonPackage rec {
10 pname = "py3buddy";
11 version = "1.0";
12 pyproject = false; # manually installed
13
14 src = fetchFromGitHub {
15 owner = "armijnhemel";
16 repo = "py3buddy";
17 rev = version;
18 hash = "sha256-KJ0xGEXHY6o2074WFZ0u7gATS+wrrjyzanYretckWYk=";
19 };
20
21 dependencies = [ pyusb ];
22
23 dontConfigure = true;
24 dontBuild = true;
25
26 installPhase = ''
27 runHook preInstall
28
29 install -D py3buddy.py $out/${python.sitePackages}/py3buddy.py
30
31 runHook postInstall
32 '';
33
34 postInstall = ''
35 install -D 99-ibuddy.rules $out/lib/udev/rules.d/99-ibuddy.rules
36 '';
37
38 meta = {
39 description = "Code to work with the iBuddy MSN figurine";
40 homepage = "https://github.com/armijnhemel/py3buddy";
41 license = lib.licenses.mit;
42 maintainers = with lib.maintainers; [ prusnak ];
43 };
44}