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