mirror of
https://github.com/CHN-beta/nixpkgs.git
synced 2026-01-12 02:40:31 +08:00
linuxPackages.acer-wmi-battery: init at 0.1.0-unstable-2025-04-24
This commit is contained in:
committed by
Peter Hoeg
parent
77a2b77c49
commit
87cb7095bf
46
pkgs/os-specific/linux/acer-wmi-battery/default.nix
Normal file
46
pkgs/os-specific/linux/acer-wmi-battery/default.nix
Normal file
@@ -0,0 +1,46 @@
|
||||
{
|
||||
stdenv,
|
||||
lib,
|
||||
fetchFromGitHub,
|
||||
kernel,
|
||||
}:
|
||||
|
||||
let
|
||||
release = "0.1.0-unstable-2025-04-24";
|
||||
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
pname = "acer-wmi-battery";
|
||||
version = "${kernel.version}-${release}";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "frederik-h";
|
||||
repo = "acer-wmi-battery";
|
||||
rev = "0889d3ea54655eaa88de552b334911ce7375952f";
|
||||
hash = "sha256-mI6Ob9BmNfwqT3nndWf3jkz8f7tV10odkTnfApsNo+A=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace Makefile \
|
||||
--replace-fail '/lib/modules/$(shell uname -r)/build' ${kernel.dev}/lib/modules/${kernel.modDirVersion}/build
|
||||
'';
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
find . -name '*.ko' -exec xz -f {} \;
|
||||
install -Dm444 -t $out/lib/modules/${kernel.modDirVersion}/kernel/drivers/platform/x86 *.ko.xz
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Driver for the Acer WMI battery health control interface";
|
||||
homepage = "https://github.com/frederik-h/acer-wmi-battery";
|
||||
license = lib.licenses.gpl2Only;
|
||||
platforms = lib.platforms.linux;
|
||||
maintainers = with lib.maintainers; [ peterhoeg ];
|
||||
};
|
||||
}
|
||||
@@ -364,6 +364,8 @@ in
|
||||
inherit (pkgs) oci-seccomp-bpf-hook; # added 2022-11
|
||||
inherit (pkgs) dpdk; # added 2024-03
|
||||
|
||||
acer-wmi-battery = callPackage ../os-specific/linux/acer-wmi-battery { };
|
||||
|
||||
acpi_call = callPackage ../os-specific/linux/acpi-call { };
|
||||
|
||||
ajantv2 = callPackage ../os-specific/linux/ajantv2 { };
|
||||
|
||||
Reference in New Issue
Block a user