1 { lib, stdenv, fetchFromGitHub, perl, kmod, coreutils }:
3 # Requires the acpi_call kernel module in order to run.
4 stdenv.mkDerivation rec {
8 src = fetchFromGitHub {
12 sha256 = "0wbaz34z99gqx721alh5vmpxpj2yxg3x9m8jqyivfi1wfpwc2nd5";
15 buildInputs = [ perl ];
19 cp tpacpi-bat $out/bin
23 substituteInPlace tpacpi-bat \
24 --replace modprobe ${kmod}/bin/modprobe \
25 --replace cat ${coreutils}/bin/cat
29 maintainers = [lib.maintainers.orbekk];
30 platforms = lib.platforms.linux;
31 description = "Tool to set battery charging thesholds on Lenovo Thinkpad";
32 license = lib.licenses.gpl3Plus;