Files
nixpkgs/pkgs/by-name/mo/mouse_m908/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

58 lines
1.3 KiB
Nix

{
stdenv,
lib,
libusb1,
installShellFiles,
fetchFromGitHub,
pkg-config,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "mouse_m908";
version = "3.4";
src = fetchFromGitHub {
owner = "dokutan";
repo = "mouse_m908";
rev = "v${finalAttrs.version}";
hash = "sha256-sCAvjNpJYkp4G0KkDJtHOBR1vc80DZJtWR2W9gakkzQ=";
};
nativeBuildInputs = [
pkg-config
installShellFiles
];
buildInputs = [ libusb1 ];
doInstallCheck = true;
# Uses proper nix directories rather than the ones specified in the makefile
installPhase = ''
runHook preInstall
mkdir -p $out/bin \
$out/share/doc \
$out/share/doc/mouse_m908 \
$out/lib/udev/rules.d
cp mouse_m908 $out/bin/mouse_m908
cp mouse_m908.rules $out/lib/udev/rules.d
cp examples/* $out/share/doc/mouse_m908
cp README.md $out/share/doc/mouse_m908
cp keymap.md $out/share/doc/mouse_m908
installManPage mouse_m908.1
runHook postInstall
'';
meta = {
homepage = "https://github.com/dokutan/mouse_m908";
description = "Control various Redragon gaming mice from Linux, BSD and Haiku";
mainProgram = "mouse_m908";
license = lib.licenses.gpl3Plus;
platforms = [ "x86_64-linux" ];
maintainers = with lib.maintainers; [ kylelovestoad ];
};
})