depot/third_party/nixpkgs/pkgs/os-specific/linux/rtl8192eu/default.nix
Default email 0eaa97ffad Project import generated by Copybara.
GitOrigin-RevId: c59ea8b8a0e7f927e7291c14ea6cd1bd3a16ff38
2020-08-20 19:08:02 +02:00

41 lines
1.1 KiB
Nix

{ stdenv, lib, fetchFromGitHub, kernel, bc }:
with lib;
let modDestDir = "$out/lib/modules/${kernel.modDirVersion}/kernel/drivers/net/wireless/realtek/rtl8192eu";
in stdenv.mkDerivation rec {
name = "rtl8192eu-${kernel.version}-${version}";
version = "4.4.1.20200620";
src = fetchFromGitHub {
owner = "Mange";
repo = "rtl8192eu-linux-driver";
rev = "925ac2be34dd608a7ca42daebf9713f0c1bcec74";
sha256 = "159vg0scq47wnn600karpgzx3naaiyl1rg8608c8d28nhm62gvjz";
};
hardeningDisable = [ "pic" ];
nativeBuildInputs = kernel.moduleBuildDependencies;
buildInputs = [ bc ];
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 = "Realtek rtl8192eu driver";
homepage = "https://github.com/Mange/rtl8192eu-linux-driver";
license = stdenv.lib.licenses.gpl2;
platforms = stdenv.lib.platforms.linux;
maintainers = with maintainers; [ troydm ];
};
}