1{ stdenv, lib, fetchFromGitHub, cmake, bash-completion, pkg-config, libconfig
2, asciidoc
3, libusbgx
4}:
5stdenv.mkDerivation {
6 pname = "gt";
7 version = "unstable-2022-05-08";
8
9 src = fetchFromGitHub {
10 owner = "linux-usb-gadgets";
11 repo = "gt";
12 rev = "7f9c45d98425a27444e49606ce3cf375e6164e8e";
13 sha256 = "sha256-km4U+t4Id2AZx6GpH24p2WNmvV5RVjJ14sy8tWLCQsk=";
14 };
15
16 sourceRoot = "source/source";
17
18 preConfigure = ''
19 cmakeFlagsArray+=("-DBASH_COMPLETION_COMPLETIONSDIR=$out/share/bash-completions/completions")
20 '';
21
22 nativeBuildInputs = [ cmake pkg-config asciidoc ];
23
24 buildInputs = [ bash-completion libconfig libusbgx];
25
26 meta = {
27 description = "Linux command line tool for setting up USB gadgets using configfs";
28 license = with lib.licenses; [ asl20 ];
29 maintainers = with lib.maintainers; [ lheckemann ];
30 platforms = lib.platforms.linux;
31 };
32}