mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 15:03:28 +00:00
g810-led: init at 0.4.3
This commit is contained in:
parent
a6ab4bfac4
commit
f628413407
51
pkgs/misc/g810-led/default.nix
Normal file
51
pkgs/misc/g810-led/default.nix
Normal file
@ -0,0 +1,51 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, hidapi
|
||||
, profile ? "/etc/g810-led/profile"
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "g810-led";
|
||||
version = "0.4.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "MatMoul";
|
||||
repo = pname;
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-GKHtQ7DinqfhclDdPO94KtTLQhhonAoWS4VOvs6CMhY=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace udev/g810-led.rules \
|
||||
--replace "/usr" $out \
|
||||
--replace "/etc/g810-led/profile" "${profile}"
|
||||
'';
|
||||
|
||||
buildInputs = [
|
||||
hidapi
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
install -D bin/g810-led $out/bin/g810-led
|
||||
|
||||
# See https://github.com/MatMoul/g810-led#compatible-keyboards-
|
||||
for keyboard in {g213,g410,g413,g512,g513,g610,g815,g910,gpro}; do
|
||||
ln -s \./g810-led $out/bin/$keyboard-led
|
||||
done
|
||||
|
||||
install -D udev/g810-led.rules $out/etc/udev/rules.d/90-g810-led.rules
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Linux LED controller for some Logitech G Keyboards";
|
||||
homepage = "https://github.com/MatMoul/g810-led";
|
||||
license = licenses.gpl3Only;
|
||||
maintainers = with maintainers; [ fab ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
@ -2199,6 +2199,8 @@ with pkgs;
|
||||
inherit (darwin.apple_sdk.frameworks) Security;
|
||||
};
|
||||
|
||||
g810-led = callPackage ../misc/g810-led { };
|
||||
|
||||
gcdemu = callPackage ../applications/emulators/cdemu/gui.nix { };
|
||||
|
||||
gensgs = pkgsi686Linux.callPackage ../applications/emulators/gens-gs { };
|
||||
|
Loading…
Reference in New Issue
Block a user