3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/os-specific/linux/rtlwifi_new/default.nix

39 lines
1 KiB
Nix
Raw Normal View History

2016-09-18 20:36:49 +01:00
{ stdenv, lib, fetchFromGitHub, kernel }:
with lib;
let modDestDir = "$out/lib/modules/${kernel.modDirVersion}/kernel/drivers/net/wireless/realtek/rtlwifi";
in stdenv.mkDerivation rec {
name = "rtlwifi_new-${version}";
version = "2016-09-12";
src = fetchFromGitHub {
owner = "lwfinger";
repo = "rtlwifi_new";
rev = "7a1b37d2121e8ab1457f002b2729fc23e6ff3e10";
sha256 = "0z8grf0fak2ryxwzapp9di77c4bghzkv8lffv76idkcnxgq6sclv";
};
hardeningDisable = [ "pic" "format" ];
makeFlags = "KSRC=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build";
enableParallelBuilding = true;
installPhase = ''
mkdir -p ${modDestDir}
find . -name '*.ko' -exec cp --parents {} ${modDestDir} \;
find ${modDestDir} -name '*.ko' -exec xz -f {} \;
'';
meta = {
description = "The newest Realtek rtlwifi codes";
inherit (src.meta) homepage;
license = stdenv.lib.licenses.gpl2;
platforms = with platforms; linux;
maintainers = with maintainers; [ tvorog ];
priority = -1;
};
}