2016-04-22 16:52:25 +02:00
|
|
|
{ stdenv, fetchFromGitHub, nukeReferences, kernel }:
|
|
|
|
with stdenv.lib;
|
2016-03-10 12:41:29 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2016-08-29 02:07:59 +02:00
|
|
|
name = "rtl8723bs-${kernel.version}-${version}";
|
|
|
|
version = "2016-04-11";
|
2016-03-29 12:25:06 +02:00
|
|
|
|
2016-03-10 12:41:29 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "hadess";
|
|
|
|
repo = "rtl8723bs";
|
2016-08-29 02:07:59 +02:00
|
|
|
rev = "11ab92d8ccd71c80f0102828366b14ef6b676fb2";
|
|
|
|
sha256 = "05q7mf12xcb00v6ba4wwvqi53q7ph5brfkj17xf6vkx4jr7xxnmm";
|
2016-03-10 12:41:29 +01:00
|
|
|
};
|
2016-03-29 12:25:06 +02:00
|
|
|
|
|
|
|
hardeningDisable = [ "pic" ];
|
|
|
|
|
2016-04-22 16:52:25 +02:00
|
|
|
buildInputs = [ nukeReferences ];
|
|
|
|
|
|
|
|
makeFlags = concatStringsSep " " [
|
|
|
|
"ARCH=${stdenv.platform.kernelArch}" # Normally not needed, but the Makefile sets ARCH in a broken way.
|
|
|
|
"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 12:25:06 +02:00
|
|
|
|
2016-04-22 16:52:25 +02:00
|
|
|
nuke-refs $(find $out -name "*.ko")
|
2016-03-10 12:41:29 +01:00
|
|
|
'';
|
2016-03-29 12:25:06 +02:00
|
|
|
|
2016-03-10 12:41:29 +01:00
|
|
|
meta = {
|
|
|
|
description = "Realtek SDIO Wi-Fi driver";
|
2017-08-01 22:03:30 +02:00
|
|
|
homepage = https://github.com/hadess/rtl8723bs;
|
2016-03-10 12:41:29 +01:00
|
|
|
license = stdenv.lib.licenses.gpl2;
|
2016-07-03 20:35:10 +02:00
|
|
|
platforms = stdenv.lib.platforms.linux;
|
2017-05-12 18:38:27 +02:00
|
|
|
broken = (! versionAtLeast kernel.version "3.19");
|
2016-04-22 16:52:25 +02:00
|
|
|
maintainers = with maintainers; [ elitak ];
|
2016-03-10 12:41:29 +01:00
|
|
|
};
|
|
|
|
}
|