mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-20 20:03:24 +00:00
4f0dadbf38
After final improvements to the official formatter implementation, this commit now performs the first treewide reformat of Nix files using it. This is part of the implementation of RFC 166. Only "inactive" files are reformatted, meaning only files that aren't being touched by any PR with activity in the past 2 months. This is to avoid conflicts for PRs that might soon be merged. Later we can do a full treewide reformat to get the rest, which should not cause as many conflicts. A CI check has already been running for some time to ensure that new and already-formatted files are formatted, so the files being reformatted here should also stay formatted. This commit was automatically created and can be verified using nix-builda08b3a4d19
.tar.gz \ --argstr baseRevb32a094368
result/bin/apply-formatting $NIXPKGS_PATH
81 lines
1.9 KiB
Nix
81 lines
1.9 KiB
Nix
{
|
|
stdenv,
|
|
lib,
|
|
fetchFromGitHub,
|
|
fetchpatch,
|
|
kernel,
|
|
writeScript,
|
|
coreutils,
|
|
gnugrep,
|
|
jq,
|
|
curl,
|
|
common-updater-scripts,
|
|
runtimeShell,
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
name = "tp_smapi-${version}-${kernel.version}";
|
|
version = "0.43";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "linux-thinkpad";
|
|
repo = "tp_smapi";
|
|
rev = "tp-smapi/${version}";
|
|
sha256 = "1rjb0njckczc2mj05cagvj0lkyvmyk6bw7wkiinv81lw8m90g77g";
|
|
};
|
|
|
|
patches = [
|
|
# update DEFINE_SEMAPHORE usage for linux 6.4+
|
|
# https://github.com/linux-thinkpad/tp_smapi/pull/45
|
|
(fetchpatch {
|
|
url = "https://github.com/linux-thinkpad/tp_smapi/commit/0c3398b1acf2a2cabd9cee91dc3fe3d35805fa8b.patch";
|
|
hash = "sha256-J/WvijrpHGwFOZMMxnHdNin5eh8vViTcNb4nwsCqsLs=";
|
|
})
|
|
];
|
|
|
|
nativeBuildInputs = kernel.moduleBuildDependencies;
|
|
|
|
hardeningDisable = [ "pic" ];
|
|
|
|
makeFlags = [
|
|
"KBASE=${kernel.dev}/lib/modules/${kernel.modDirVersion}"
|
|
"SHELL=${stdenv.shell}"
|
|
"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"
|
|
install -v -D -m 644 hdaps.ko "$out/lib/modules/${kernel.modDirVersion}/kernel/drivers/firmware/hdapsd.ko"
|
|
'';
|
|
|
|
dontStrip = true;
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
passthru.updateScript = import ./update.nix {
|
|
inherit
|
|
lib
|
|
writeScript
|
|
coreutils
|
|
gnugrep
|
|
jq
|
|
curl
|
|
common-updater-scripts
|
|
runtimeShell
|
|
;
|
|
};
|
|
|
|
meta = {
|
|
description = "IBM ThinkPad hardware functions driver";
|
|
homepage = "https://github.com/linux-thinkpad/tp_smapi";
|
|
license = lib.licenses.gpl2Plus;
|
|
maintainers = [ ];
|
|
# driver is only ment for linux thinkpads i think bellow platforms should cover it.
|
|
platforms = [
|
|
"x86_64-linux"
|
|
"i686-linux"
|
|
];
|
|
};
|
|
}
|