2023-07-23 18:42:30 +00:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
2023-07-27 17:27:51 +00:00
|
|
|
, stdenv
|
|
|
|
, pkg-config
|
|
|
|
, darwin
|
|
|
|
, xorg
|
2023-07-23 18:42:30 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "kbt";
|
2023-07-28 13:39:09 +00:00
|
|
|
version = "1.2.1";
|
2023-07-23 18:42:30 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "bloznelis";
|
|
|
|
repo = "kbt";
|
|
|
|
rev = version;
|
2023-07-28 13:39:09 +00:00
|
|
|
hash = "sha256-IVKGpifLcpqPD4ZYP+1mY0EokNoQW6qSbxt66w6b81w=";
|
2023-07-23 18:42:30 +00:00
|
|
|
};
|
|
|
|
|
2023-07-28 13:39:09 +00:00
|
|
|
cargoHash = "sha256-iPsBYccLQdPvzaV7pRa3ZLFFwJ1lIJoFMWChLkQpyyk=";
|
2023-07-27 17:27:51 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = lib.optionals stdenv.isLinux [
|
|
|
|
pkg-config
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [
|
|
|
|
darwin.apple_sdk.frameworks.AppKit
|
|
|
|
] ++ lib.optionals stdenv.isLinux [
|
|
|
|
xorg.libX11
|
|
|
|
];
|
2023-07-23 18:42:30 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Keyboard tester in terminal";
|
|
|
|
homepage = "https://github.com/bloznelis/kbt";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ figsoda ];
|
|
|
|
};
|
|
|
|
}
|