linuxKernel.packages.tp_smapi: fix build for 6.4+

+23 -4
+23 -4
pkgs/os-specific/linux/tp_smapi/default.nix
··· 1 - { stdenv, lib, fetchFromGitHub, kernel, writeScript, coreutils, gnugrep, jq, curl, common-updater-scripts, runtimeShell 1 + { stdenv 2 + , lib 3 + , fetchFromGitHub 4 + , fetchpatch 5 + , kernel 6 + , writeScript 7 + , coreutils 8 + , gnugrep 9 + , jq 10 + , curl 11 + , common-updater-scripts 12 + , runtimeShell 2 13 }: 3 14 4 15 stdenv.mkDerivation rec { ··· 6 17 version = "0.43"; 7 18 8 19 src = fetchFromGitHub { 9 - owner = "evgeni"; 20 + owner = "linux-thinkpad"; 10 21 repo = "tp_smapi"; 11 22 rev = "tp-smapi/${version}"; 12 23 sha256 = "1rjb0njckczc2mj05cagvj0lkyvmyk6bw7wkiinv81lw8m90g77g"; 13 - name = "tp-smapi-${version}"; 14 24 }; 25 + 26 + patches = [ 27 + # update DEFINE_SEMAPHORE usage for linux 6.4+ 28 + # https://github.com/linux-thinkpad/tp_smapi/pull/45 29 + (fetchpatch { 30 + url = "https://github.com/linux-thinkpad/tp_smapi/commit/0c3398b1acf2a2cabd9cee91dc3fe3d35805fa8b.patch"; 31 + hash = "sha256-J/WvijrpHGwFOZMMxnHdNin5eh8vViTcNb4nwsCqsLs="; 32 + }) 33 + ]; 15 34 16 35 nativeBuildInputs = kernel.moduleBuildDependencies; 17 36 ··· 39 58 40 59 meta = { 41 60 description = "IBM ThinkPad hardware functions driver"; 42 - homepage = "https://github.com/evgeni/tp_smapi"; 61 + homepage = "https://github.com/linux-thinkpad/tp_smapi"; 43 62 license = lib.licenses.gpl2; 44 63 maintainers = [ ]; 45 64 # driver is only ment for linux thinkpads i think bellow platforms should cover it.