2022-01-26 04:04:25 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub, cmake, bash-completion, pkg-config, libconfig
|
|
|
|
, asciidoc
|
|
|
|
, libusbgx
|
|
|
|
}:
|
2023-08-04 22:07:22 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2022-01-26 04:04:25 +00:00
|
|
|
pname = "gt";
|
2022-07-14 12:49:19 +00:00
|
|
|
version = "unstable-2022-05-08";
|
2022-01-26 04:04:25 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "linux-usb-gadgets";
|
|
|
|
repo = "gt";
|
2022-07-14 12:49:19 +00:00
|
|
|
rev = "7f9c45d98425a27444e49606ce3cf375e6164e8e";
|
|
|
|
sha256 = "sha256-km4U+t4Id2AZx6GpH24p2WNmvV5RVjJ14sy8tWLCQsk=";
|
2022-01-26 04:04:25 +00:00
|
|
|
};
|
2022-07-14 12:49:19 +00:00
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
sourceRoot = "${finalAttrs.src.name}/source";
|
2022-01-26 04:04:25 +00:00
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
cmakeFlagsArray+=("-DBASH_COMPLETION_COMPLETIONSDIR=$out/share/bash-completions/completions")
|
|
|
|
'';
|
2022-07-14 12:49:19 +00:00
|
|
|
|
2022-01-26 04:04:25 +00:00
|
|
|
nativeBuildInputs = [ cmake pkg-config asciidoc ];
|
2022-07-14 12:49:19 +00:00
|
|
|
|
2022-01-26 04:04:25 +00:00
|
|
|
buildInputs = [ bash-completion libconfig libusbgx];
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Linux command line tool for setting up USB gadgets using configfs";
|
|
|
|
license = with lib.licenses; [ asl20 ];
|
|
|
|
maintainers = with lib.maintainers; [ lheckemann ];
|
|
|
|
platforms = lib.platforms.linux;
|
|
|
|
};
|
2023-08-04 22:07:22 +00:00
|
|
|
})
|