nixpkgs/pkgs/os-specific/linux/rtlwifi_new/default.nix

39 lines
1 KiB
Nix
Raw Normal View History

2016-09-18 21:36:49 +02: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}";
2017-08-28 22:58:45 +02:00
version = "2017-07-18";
2016-09-18 21:36:49 +02:00
src = fetchFromGitHub {
owner = "lwfinger";
repo = "rtlwifi_new";
2017-08-28 22:58:45 +02:00
rev = "a24cb561b4d23187ea103255336daa7ca88791a7";
sha256 = "1w9rx5wafcp1vc4yh7lj332bv78szl6gmx3ckr8yl6c39alqcv0d";
2016-09-18 21:36:49 +02:00
};
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;
};
}