kernel: openrazer: init at 2.6.0
This commit is contained in:
parent
50eba5b688
commit
bcbadc5ba2
39
pkgs/os-specific/linux/openrazer/driver.nix
Normal file
39
pkgs/os-specific/linux/openrazer/driver.nix
Normal file
|
@ -0,0 +1,39 @@
|
|||
{ coreutils
|
||||
, fetchFromGitHub
|
||||
, kernel
|
||||
, stdenv
|
||||
, utillinux
|
||||
}:
|
||||
|
||||
let
|
||||
common = import ../../../development/python-modules/openrazer/common.nix { inherit stdenv fetchFromGitHub; };
|
||||
in
|
||||
stdenv.mkDerivation (common // {
|
||||
name = "openrazer-${common.version}-${kernel.version}";
|
||||
|
||||
nativeBuildInputs = kernel.moduleBuildDependencies;
|
||||
|
||||
buildFlags = [
|
||||
"KERNELDIR=${kernel.dev}/lib/modules/${kernel.version}/build"
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
binDir="$out/lib/modules/${kernel.modDirVersion}/kernel/drivers/hid"
|
||||
mkdir -p "$binDir"
|
||||
cp -v driver/*.ko "$binDir"
|
||||
RAZER_MOUNT_OUT="$out/bin/razer_mount"
|
||||
RAZER_RULES_OUT="$out/etc/udev/rules.d/99-razer.rules"
|
||||
install -m 644 -v -D install_files/udev/99-razer.rules $RAZER_RULES_OUT
|
||||
install -m 755 -v -D install_files/udev/razer_mount $RAZER_MOUNT_OUT
|
||||
substituteInPlace $RAZER_RULES_OUT \
|
||||
--replace razer_mount $RAZER_MOUNT_OUT
|
||||
substituteInPlace $RAZER_MOUNT_OUT \
|
||||
--replace /usr/bin/logger ${utillinux}/bin/logger \
|
||||
--replace chgrp ${coreutils}/bin/chgrp \
|
||||
--replace "PATH='/sbin:/bin:/usr/sbin:/usr/bin'" ""
|
||||
'';
|
||||
|
||||
meta = common.meta // {
|
||||
description = "An entirely open source Linux driver that allows you to manage your Razer peripherals on GNU/Linux";
|
||||
};
|
||||
})
|
|
@ -15856,6 +15856,8 @@ in
|
|||
nvidia_x11_beta = nvidiaPackages.beta;
|
||||
nvidia_x11 = nvidiaPackages.stable;
|
||||
|
||||
openrazer = callPackage ../os-specific/linux/openrazer/driver.nix { };
|
||||
|
||||
ply = callPackage ../os-specific/linux/ply { };
|
||||
|
||||
r8168 = callPackage ../os-specific/linux/r8168 { };
|
||||
|
|
Loading…
Reference in a new issue