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