depot/third_party/nixpkgs/pkgs/os-specific/linux/rtl8192eu/default.nix
Default email 3a4df29a92 Project import generated by Copybara.
GitOrigin-RevId: 3d7435c638baffaa826b85459df0fff47f12317d
2022-06-16 19:23:12 +02:00

44 lines
1.2 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 {
pname = "rtl8192eu";
version = "${kernel.version}-4.4.1.20220313";
src = fetchFromGitHub {
owner = "Mange";
repo = "rtl8192eu-linux-driver";
rev = "e0f967cea1d0037c730246c572f7fef000865ff7";
sha256 = "sha256-Wgp1MZ/z8AxbZPYsmR6t7Q4nsL0TFEqTEsrkkWPI6gI=";
};
hardeningDisable = [ "pic" ];
nativeBuildInputs = kernel.moduleBuildDependencies ++ [ bc ];
makeFlags = kernel.makeFlags ++ [ "KSRC=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" ];
enableParallelBuilding = true;
installPhase = ''
runHook preInstall
mkdir -p ${modDestDir}
find . -name '*.ko' -exec cp --parents {} ${modDestDir} \;
find ${modDestDir} -name '*.ko' -exec xz -f {} \;
runHook postInstall
'';
meta = with lib; {
description = "Realtek rtl8192eu driver";
homepage = "https://github.com/Mange/rtl8192eu-linux-driver";
license = licenses.gpl2Only;
platforms = platforms.linux;
broken = stdenv.hostPlatform.isAarch64 || kernel.kernelAtLeast "5.18";
maintainers = with maintainers; [ troydm ];
};
}