diff options
-rw-r--r-- | pkgs/os-specific/linux/tp_smapi/default.nix | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/pkgs/os-specific/linux/tp_smapi/default.nix b/pkgs/os-specific/linux/tp_smapi/default.nix index d9b4333d249..d9c5921d465 100644 --- a/pkgs/os-specific/linux/tp_smapi/default.nix +++ b/pkgs/os-specific/linux/tp_smapi/default.nix @@ -1,4 +1,15 @@ -{ stdenv, lib, fetchFromGitHub, kernel, writeScript, coreutils, gnugrep, jq, curl, common-updater-scripts, runtimeShell +{ stdenv +, lib +, fetchFromGitHub +, fetchpatch +, kernel +, writeScript +, coreutils +, gnugrep +, jq +, curl +, common-updater-scripts +, runtimeShell }: stdenv.mkDerivation rec { @@ -6,13 +17,21 @@ stdenv.mkDerivation rec { version = "0.43"; src = fetchFromGitHub { - owner = "evgeni"; + owner = "linux-thinkpad"; repo = "tp_smapi"; rev = "tp-smapi/${version}"; sha256 = "1rjb0njckczc2mj05cagvj0lkyvmyk6bw7wkiinv81lw8m90g77g"; - name = "tp-smapi-${version}"; }; + 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" ]; @@ -39,7 +58,7 @@ stdenv.mkDerivation rec { meta = { description = "IBM ThinkPad hardware functions driver"; - homepage = "https://github.com/evgeni/tp_smapi"; + homepage = "https://github.com/linux-thinkpad/tp_smapi"; license = lib.licenses.gpl2; maintainers = [ ]; # driver is only ment for linux thinkpads i think bellow platforms should cover it. |