about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/misc/uhubctl/default.nix
blob: a6fe1853ae55716614bc2775ec005b27f4f18a79 (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
{ stdenv
, fetchFromGitHub
, libusb
}:

stdenv.mkDerivation rec {
  pname = "uhubctl";
  version = "2.1.0";

  src = fetchFromGitHub {
    owner = "mvp";
    repo = "uhubctl";
    rev = "refs/tags/v${version}";
    sha256 = "1cgmwsf68g49k6q4jvz073bpjhg5p73kk1a4kbgkxmvx01gmbcmq";
  };

  buildInputs = [ libusb ];

  installFlags = [ "prefix=${placeholder "out"}" ];
  meta = with stdenv.lib; {
    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;
  };
}