inputmodule-control: init at v0.2.0

Packaged this as it was still missing from nixpkgs and to further support NixOS on Framework laptops. Repo: https://github.com/FrameworkComputer/inputmodule-rs Release: https://github.com/FrameworkComputer/inputmodule-rs/releases/tag/v0.2.0
This commit is contained in:
Torben Schweren
2024-12-12 22:58:26 +01:00
parent 71eb26ef20
commit bcab2a1246
@@ -0,0 +1,49 @@
{
lib,
stdenv,
testers,
rustPlatform,
fetchFromGitHub,
inputmodule-control,
pkg-config,
libudev-zero,
}:
rustPlatform.buildRustPackage rec {
pname = "inputmodule-control";
version = "0.2.0";
src = fetchFromGitHub {
owner = "FrameworkComputer";
repo = "inputmodule-rs";
rev = "v${version}";
hash = "sha256-5sqTkaGqmKDDH7byDZ84rzB3FTu9AKsWxA6EIvUrLCU=";
};
useFetchCargoVendor = true;
cargoHash = "sha256-s5k23p0Fo+DQvGpDvy/VmGNFK7ZysqLIyDPuUn6n724=";
buildAndTestSubdir = "inputmodule-control";
nativeBuildInputs = [ pkg-config ];
buildInputs = [ libudev-zero ];
postInstall = ''
install -Dm644 release/50-framework-inputmodule.rules $out/etc/udev/rules.d/50-framework-inputmodule.rules
'';
passthru.tests.version = testers.testVersion {
package = inputmodule-control;
};
meta = {
description = "CLI tool to control Framework input modules like the LED matrix";
license = lib.licenses.mit;
platforms = lib.platforms.linux;
mainProgram = "inputmodule-control";
homepage = "https://github.com/FrameworkComputer/inputmodule-rs";
downloadPage = "https://github.com/FrameworkComputer/inputmodule-rs/releases/tag/${src.rev}";
changelog = "https://github.com/FrameworkComputer/inputmodule-rs/releases/tag/${src.rev}";
maintainers = with lib.maintainers; [ Kitt3120 ];
};
}