1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/pkgs/os-specific/linux/tp_smapi/default.nix

49 lines
1.5 KiB
Nix
Raw Normal View History

{ stdenv, lib, fetchFromGitHub, kernel, writeScript, coreutils, gnugrep, jq, curl, common-updater-scripts, runtimeShell
2016-12-10 03:37:37 +00:00
}:
stdenv.mkDerivation rec {
name = "tp_smapi-${version}-${kernel.version}";
2018-02-24 21:48:58 +00:00
version = "0.43";
src = fetchFromGitHub {
owner = "evgeni";
repo = "tp_smapi";
2018-02-24 21:48:58 +00:00
rev = "tp-smapi/${version}";
sha256 = "1rjb0njckczc2mj05cagvj0lkyvmyk6bw7wkiinv81lw8m90g77g";
name = "tp-smapi-${version}";
};
nativeBuildInputs = kernel.moduleBuildDependencies;
hardeningDisable = [ "pic" ];
makeFlags = [
"KBASE=${kernel.dev}/lib/modules/${kernel.modDirVersion}"
"SHELL=${stdenv.shell}"
2017-09-04 08:41:57 +01:00
"HDAPS=1"
];
installPhase = ''
install -v -D -m 644 thinkpad_ec.ko "$out/lib/modules/${kernel.modDirVersion}/kernel/drivers/firmware/thinkpad_ec.ko"
install -v -D -m 644 tp_smapi.ko "$out/lib/modules/${kernel.modDirVersion}/kernel/drivers/firmware/tp_smapi.ko"
2017-09-05 08:24:30 +01:00
install -v -D -m 644 hdaps.ko "$out/lib/modules/${kernel.modDirVersion}/kernel/drivers/firmware/hdapsd.ko"
'';
dontStrip = true;
enableParallelBuilding = true;
2016-12-10 03:37:37 +00:00
passthru.updateScript = import ./update.nix {
inherit lib writeScript coreutils gnugrep jq curl common-updater-scripts runtimeShell;
2016-12-10 03:37:37 +00:00
};
meta = {
description = "IBM ThinkPad hardware functions driver";
homepage = "https://github.com/evgeni/tp_smapi";
2021-01-15 14:45:37 +00:00
license = lib.licenses.gpl2;
maintainers = [ ];
# driver is only ment for linux thinkpads i think bellow platforms should cover it.
platforms = [ "x86_64-linux" "i686-linux" ];
};
}