@@ -0,0 +1,28 @@
1+{ stdenv
2+, fetchFromGitHub
3+, libusb
4+}:
5+
6+stdenv.mkDerivation rec {
7+ pname = "uhubctl";
8+ version = "unstable-2019-07-31";
9+
10+ src = fetchFromGitHub {
11+ owner = "mvp";
12+ repo = "uhubctl";
13+ rev = "1961aa02e9924a54a6219d16c61a0beb0d626e46";
14+ sha256 = "15mvqp1xh079nqp0mynh3l1wmw4maa320pn4jr8bz7nh3knmk0n1";
15+ };
16+
17+ buildInputs = [ libusb ];
18+
19+ installFlags = [ "prefix=$(out)" ];
20+
21+ meta = with stdenv.lib; {
22+ homepage = "https://github.com/mvp/uhubctl";
23+ description = "Utility to control USB power per-port on smart USB hubs";
24+ license = licenses.gpl2;
25+ maintainers = with maintainers; [ prusnak ];
26+ platforms = with platforms; linux ++ darwin;
27+ };
28+}