2021-02-04 16:29:29 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2019-08-20 10:38:01 +01:00
|
|
|
, fetchFromGitHub
|
2020-04-04 11:47:39 +01:00
|
|
|
, libusb1
|
2019-08-20 10:38:01 +01:00
|
|
|
}:
|
|
|
|
|
2019-09-09 04:25:24 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-20 10:38:01 +01:00
|
|
|
pname = "uhubctl";
|
2021-02-04 14:44:12 +00:00
|
|
|
version = "2.3.0";
|
2019-08-20 10:38:01 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mvp";
|
|
|
|
repo = "uhubctl";
|
2021-02-04 16:29:29 +00:00
|
|
|
rev = "v${version}";
|
2021-02-04 14:44:12 +00:00
|
|
|
sha256 = "1wxsiygw6gwv1h90yassnxylkyi2dfz7y59qkmb7rs8a8javj7nv";
|
2019-08-20 10:38:01 +01:00
|
|
|
};
|
|
|
|
|
2020-04-04 11:47:39 +01:00
|
|
|
buildInputs = [ libusb1 ];
|
2019-08-20 10:38:01 +01:00
|
|
|
|
2019-09-09 04:25:24 +01:00
|
|
|
installFlags = [ "prefix=${placeholder "out"}" ];
|
2021-02-04 16:29:29 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2019-08-20 10:38:01 +01:00
|
|
|
homepage = "https://github.com/mvp/uhubctl";
|
|
|
|
description = "Utility to control USB power per-port on smart USB hubs";
|
|
|
|
license = licenses.gpl2;
|
|
|
|
maintainers = with maintainers; [ prusnak ];
|
|
|
|
platforms = with platforms; linux ++ darwin;
|
|
|
|
};
|
|
|
|
}
|