nixpkgs-suyu/pkgs/os-specific/linux/rtl8723bs/default.nix

40 lines
1.3 KiB
Nix
Raw Normal View History

2016-04-22 16:52:25 +02:00
{ stdenv, fetchFromGitHub, nukeReferences, kernel }:
with stdenv.lib;
stdenv.mkDerivation rec {
2016-04-22 16:52:25 +02:00
name = "rtl8723bs-${kernel.version}-${rev}";
2016-04-22 17:00:56 +02:00
rev = "6918e9b2ff297b1cc7fde193e72452c33c10e1c8";
2016-04-22 16:52:25 +02:00
src = fetchFromGitHub {
owner = "hadess";
repo = "rtl8723bs";
2016-04-22 16:52:25 +02:00
inherit rev;
2016-04-22 17:00:56 +02:00
sha256 = "07srd457wnz29nvvq02wz66s387bhjbydnmbs3qr7ljprabhsgmi";
};
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
nuke-refs $(find $out -name "*.ko")
'';
2016-04-22 16:52:25 +02:00
meta = {
description = "Realtek SDIO Wi-Fi driver";
homepage = "https://github.com/hadess/rtl8723bs";
license = stdenv.lib.licenses.gpl2;
2016-07-03 20:35:10 +02:00
platforms = stdenv.lib.platforms.linux;
2016-04-22 16:52:25 +02:00
broken = ! versionAtLeast kernel.version "3.19";
maintainers = with maintainers; [ elitak ];
};
}