nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 which,
6 pkg-config,
7 libusb1,
8}:
9
10stdenv.mkDerivation (finalAttrs: {
11 pname = "uhubctl";
12 version = "2.6.0";
13
14 src = fetchFromGitHub {
15 owner = "mvp";
16 repo = "uhubctl";
17 rev = "v${finalAttrs.version}";
18 sha256 = "sha256-mpeDePHLsa4sGe2+8X9KQ8AYn7wtybDnaZzxnf4oETQ=";
19 };
20
21 nativeBuildInputs = [
22 which
23 pkg-config
24 ];
25
26 buildInputs = [ libusb1 ];
27
28 installFlags = [ "prefix=${placeholder "out"}" ];
29
30 meta = {
31 homepage = "https://github.com/mvp/uhubctl";
32 description = "Utility to control USB power per-port on smart USB hubs";
33 license = lib.licenses.gpl2Only;
34 maintainers = with lib.maintainers; [
35 prusnak
36 carlossless
37 ];
38 platforms = with lib.platforms; linux ++ darwin;
39 mainProgram = "uhubctl";
40 };
41})