2022-11-21 17:40:18 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, kernel, bc }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
pname = "rtl8723ds";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "${kernel.version}-unstable-2023-11-14";
|
2022-11-21 17:40:18 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "lwfinger";
|
|
|
|
repo = "rtl8723ds";
|
2024-05-15 15:35:15 +00:00
|
|
|
rev = "52e593e8c889b68ba58bd51cbdbcad7fe71362e4";
|
|
|
|
sha256 = "sha256-SszvDuWN9opkXyVQAOLjnNtPp93qrKgnGvzK0y7Y9b0=";
|
2022-11-21 17:40:18 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
hardeningDisable = [ "pic" ];
|
|
|
|
|
2023-02-16 17:41:37 +00:00
|
|
|
nativeBuildInputs = [ bc ] ++ kernel.moduleBuildDependencies;
|
2022-11-21 17:40:18 +00:00
|
|
|
|
|
|
|
makeFlags = [
|
|
|
|
"ARCH=${stdenv.hostPlatform.linuxArch}"
|
|
|
|
] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
|
|
|
|
"CROSS_COMPILE=${stdenv.cc.targetPrefix}"
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace ./Makefile \
|
|
|
|
--replace /lib/modules/ "${kernel.dev}/lib/modules/" \
|
|
|
|
--replace "/sbin/depmod" "#" \
|
|
|
|
--replace '$(MODDESTDIR)' "$out/lib/modules/${kernel.modDirVersion}/kernel/net/wireless/"
|
|
|
|
'';
|
|
|
|
|
|
|
|
preInstall = ''
|
|
|
|
mkdir -p "$out/lib/modules/${kernel.modDirVersion}/kernel/net/wireless/"
|
|
|
|
'';
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
meta = {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Linux driver for RTL8723DS";
|
2022-11-21 17:40:18 +00:00
|
|
|
homepage = "https://github.com/lwfinger/rtl8723ds";
|
|
|
|
license = lib.licenses.gpl2Only;
|
|
|
|
platforms = lib.platforms.linux;
|
|
|
|
maintainers = with lib.maintainers; [ chuangzhu ];
|
|
|
|
};
|
|
|
|
}
|