1{ lib, stdenv 2, fetchFromGitHub 3, python 4, pyusb 5}: 6 7stdenv.mkDerivation rec { 8 pname = "py3buddy"; 9 version = "unstable-2019-09-29"; 10 11 src = fetchFromGitHub { 12 owner = "armijnhemel"; 13 repo = pname; 14 rev = "2b28908454645117368ca56df67548c93f4e0b03"; 15 sha256 = "12ar4kbplavndarkrbibxi5i607f5sfia5myscvalqy78lc33798"; 16 }; 17 18 propagatedBuildInputs = [ pyusb ]; 19 20 dontConfigure = true; 21 dontBuild = true; 22 dontCheck = true; 23 24 installPhase = '' 25 install -D py3buddy.py $out/${python.sitePackages}/py3buddy.py 26 ''; 27 28 postInstall = '' 29 install -D 99-ibuddy.rules $out/lib/udev/rules.d/99-ibuddy.rules 30 ''; 31 32 meta = with lib; { 33 description = "Code to work with the iBuddy MSN figurine"; 34 homepage = "https://github.com/armijnhemel/py3buddy"; 35 license = with licenses; [ mit ]; 36 maintainers = with maintainers; [ prusnak ]; 37 }; 38}