about summary refs log tree commit diff
path: root/pkgs/development/python-modules/py3buddy/default.nix
blob: b8a25480799b35fa5c28bc3d61f06cc6179ab369 (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
{ lib, stdenv
, fetchFromGitHub
, python
, pyusb
}:

stdenv.mkDerivation rec {
  pname = "py3buddy";
  version = "unstable-2019-09-29";

  src = fetchFromGitHub {
    owner = "armijnhemel";
    repo = pname;
    rev = "2b28908454645117368ca56df67548c93f4e0b03";
    sha256 = "12ar4kbplavndarkrbibxi5i607f5sfia5myscvalqy78lc33798";
  };

  propagatedBuildInputs = [ pyusb ];

  dontConfigure = true;
  dontBuild = true;
  dontCheck = true;

  installPhase = ''
    install -D py3buddy.py $out/${python.sitePackages}/py3buddy.py
  '';

  postInstall = ''
    install -D 99-ibuddy.rules $out/lib/udev/rules.d/99-ibuddy.rules
  '';

  meta = with lib; {
    description = "Code to work with the iBuddy MSN figurine";
    homepage = "https://github.com/armijnhemel/py3buddy";
    license = with licenses; [ mit ];
    maintainers = with maintainers; [ prusnak ];
  };
}