forked from mirrors/nixpkgs
rtl8189es: init at 2020-10-03
Co-Authored-By: Linus Heckemann <git@sphalerite.org>
This commit is contained in:
parent
6d8215281b
commit
1b94b6c8cc
50
pkgs/os-specific/linux/rtl8189es/default.nix
Normal file
50
pkgs/os-specific/linux/rtl8189es/default.nix
Normal file
|
@ -0,0 +1,50 @@
|
||||||
|
{ stdenv, lib, fetchFromGitHub, kernel, bc, nukeReferences }:
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
name = "rtl8189es-${kernel.version}-${version}";
|
||||||
|
version = "2020-10-03";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "jwrdegoede";
|
||||||
|
repo = "rtl8189ES_linux";
|
||||||
|
rev = "03ac413135a355b55b693154c44b70f86a39732e";
|
||||||
|
sha256 = "0wiikviwyvy6h55rgdvy7csi1zqniqg26p8x44rd6mhbw0g00h56";
|
||||||
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = [ bc nukeReferences ];
|
||||||
|
buildInputs = kernel.moduleBuildDependencies;
|
||||||
|
|
||||||
|
hardeningDisable = [ "pic" "format" ];
|
||||||
|
|
||||||
|
prePatch = ''
|
||||||
|
substituteInPlace ./Makefile --replace /lib/modules/ "${kernel.dev}/lib/modules/"
|
||||||
|
substituteInPlace ./Makefile --replace '$(shell uname -r)' "${kernel.modDirVersion}"
|
||||||
|
substituteInPlace ./Makefile --replace /sbin/depmod \#
|
||||||
|
substituteInPlace ./Makefile --replace '$(MODDESTDIR)' "$out/lib/modules/${kernel.modDirVersion}/kernel/net/wireless/"
|
||||||
|
'';
|
||||||
|
|
||||||
|
makeFlags = [
|
||||||
|
"ARCH=${stdenv.hostPlatform.linuxArch}"
|
||||||
|
"KSRC=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
|
||||||
|
("CONFIG_PLATFORM_I386_PC=" + (if (stdenv.hostPlatform.isi686 || stdenv.hostPlatform.isx86_64) then "y" else "n"))
|
||||||
|
("CONFIG_PLATFORM_ARM_RPI=" + (if (stdenv.hostPlatform.isAarch32 || stdenv.hostPlatform.isAarch64) then "y" else "n"))
|
||||||
|
] ++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) [
|
||||||
|
"CROSS_COMPILE=${stdenv.cc.targetPrefix}"
|
||||||
|
];
|
||||||
|
|
||||||
|
preInstall = ''
|
||||||
|
mkdir -p "$out/lib/modules/${kernel.modDirVersion}/kernel/net/wireless/"
|
||||||
|
'';
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
nuke-refs $out/lib/modules/*/kernel/net/wireless/*.ko
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "Driver for Realtek rtl8189es";
|
||||||
|
homepage = "https://github.com/jwrdegoede/rtl8189ES_linux";
|
||||||
|
license = licenses.gpl2;
|
||||||
|
platforms = platforms.linux;
|
||||||
|
maintainers = with maintainers; [ danielfullmer lheckemann ];
|
||||||
|
};
|
||||||
|
}
|
|
@ -348,6 +348,8 @@ in {
|
||||||
|
|
||||||
rtl8192eu = callPackage ../os-specific/linux/rtl8192eu { };
|
rtl8192eu = callPackage ../os-specific/linux/rtl8192eu { };
|
||||||
|
|
||||||
|
rtl8189es = callPackage ../os-specific/linux/rtl8189es { };
|
||||||
|
|
||||||
rtl8723bs = callPackage ../os-specific/linux/rtl8723bs { };
|
rtl8723bs = callPackage ../os-specific/linux/rtl8723bs { };
|
||||||
|
|
||||||
rtl8812au = callPackage ../os-specific/linux/rtl8812au { };
|
rtl8812au = callPackage ../os-specific/linux/rtl8812au { };
|
||||||
|
|
Loading…
Reference in a new issue