1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-29 00:54:11 +00:00
nixpkgs/pkgs/os-specific/linux/tpacpi-bat/default.nix
2016-11-08 02:46:34 +01:00

33 lines
790 B
Nix

{ stdenv, fetchFromGitHub, perl, kmod }:
# Requires the acpi_call kernel module in order to run.
stdenv.mkDerivation rec {
name = "tpacpi-bat-${version}";
version = "3.0";
src = fetchFromGitHub {
owner = "teleshoes";
repo = "tpacpi-bat";
rev = "v${version}";
sha256 = "0l72qvjk5j7sg9x4by7an0xwx65x10dx82fky8lnwlwfv54vgg8l";
};
buildInputs = [ perl ];
installPhase = ''
mkdir -p $out/bin
cp tpacpi-bat $out/bin
'';
postPatch = ''
substituteInPlace tpacpi-bat --replace modprobe ${kmod}/bin/modprobe
'';
meta = {
maintainers = [stdenv.lib.maintainers.orbekk];
platforms = stdenv.lib.platforms.linux;
description = "Tool to set battery charging thesholds on Lenovo Thinkpad";
license = stdenv.lib.licenses.gpl3Plus;
};
}