2021-01-15 14:45:37 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, nukeReferences, kernel }:
|
|
|
|
with lib;
|
2016-03-10 11:41:29 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2016-08-29 00:07:59 +00:00
|
|
|
name = "rtl8723bs-${kernel.version}-${version}";
|
2017-08-28 21:18:58 +00:00
|
|
|
version = "2017-04-06";
|
2016-03-29 10:25:06 +00:00
|
|
|
|
2016-03-10 11:41:29 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "hadess";
|
|
|
|
repo = "rtl8723bs";
|
2017-08-28 21:18:58 +00:00
|
|
|
rev = "db2c4f61d48fe3b47c167c8bcd722ce83c24aca5";
|
|
|
|
sha256 = "0pxqya14a61vv2v5ky1ldybc0mjfin9mpvmajlmv0lls904rph7g";
|
2016-03-10 11:41:29 +00:00
|
|
|
};
|
2016-03-29 10:25:06 +00:00
|
|
|
|
|
|
|
hardeningDisable = [ "pic" ];
|
|
|
|
|
2016-04-22 14:52:25 +00:00
|
|
|
buildInputs = [ nukeReferences ];
|
|
|
|
|
2019-10-29 22:21:22 +00:00
|
|
|
makeFlags = [
|
2021-01-23 01:33:55 +00:00
|
|
|
"ARCH=${stdenv.hostPlatform.linuxArch}" # Normally not needed, but the Makefile sets ARCH in a broken way.
|
2016-04-22 14:52:25 +00:00
|
|
|
"KSRC=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" # Makefile uses $(uname -r); breaks us.
|
|
|
|
];
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
# The Makefile doesn't use env-vars well, so install manually:
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/lib/modules/${kernel.modDirVersion}/kernel/drivers/net/wireless
|
|
|
|
cp r8723bs.ko $out/lib/modules/${kernel.modDirVersion}/kernel/drivers/net/wireless
|
2016-03-29 10:25:06 +00:00
|
|
|
|
2016-04-22 14:52:25 +00:00
|
|
|
nuke-refs $(find $out -name "*.ko")
|
2016-03-10 11:41:29 +00:00
|
|
|
'';
|
2016-03-29 10:25:06 +00:00
|
|
|
|
2016-03-10 11:41:29 +00:00
|
|
|
meta = {
|
|
|
|
description = "Realtek SDIO Wi-Fi driver";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/hadess/rtl8723bs";
|
2021-01-15 14:45:37 +00:00
|
|
|
license = lib.licenses.gpl2;
|
|
|
|
platforms = lib.platforms.linux;
|
2017-08-28 21:18:58 +00:00
|
|
|
broken = (! versionOlder kernel.version "4.12"); # Now in kernel staging drivers
|
2016-04-22 14:52:25 +00:00
|
|
|
maintainers = with maintainers; [ elitak ];
|
2016-03-10 11:41:29 +00:00
|
|
|
};
|
|
|
|
}
|