From 98edc9b2531827abd557d6455829b036354cb5ad Mon Sep 17 00:00:00 2001 From: Chuang Zhu Date: Thu, 3 Nov 2022 10:00:00 +0800 Subject: [PATCH] linuxPackages.rtl8723ds: init at unstable-2022-10-20 --- pkgs/os-specific/linux/rtl8723ds/default.nix | 46 ++++++++++++++++++++ pkgs/top-level/linux-kernels.nix | 2 + 2 files changed, 48 insertions(+) create mode 100644 pkgs/os-specific/linux/rtl8723ds/default.nix diff --git a/pkgs/os-specific/linux/rtl8723ds/default.nix b/pkgs/os-specific/linux/rtl8723ds/default.nix new file mode 100644 index 000000000000..a732d1c5d8e5 --- /dev/null +++ b/pkgs/os-specific/linux/rtl8723ds/default.nix @@ -0,0 +1,46 @@ +{ lib, stdenv, fetchFromGitHub, kernel, bc }: + +stdenv.mkDerivation { + pname = "rtl8723ds"; + version = "${kernel.version}-unstable-2022-10-20"; + + src = fetchFromGitHub { + owner = "lwfinger"; + repo = "rtl8723ds"; + rev = "912fdb30531bc8c071267a047e7df16feae7a865"; + sha256 = "sha256-HhoCKrrRg1Q995sekQvzhaiqANeTP8pANItj2vLV+Cw="; + }; + + hardeningDisable = [ "pic" ]; + + nativeBuildInputs = [ bc ]; + buildInputs = kernel.moduleBuildDependencies; + + makeFlags = [ + "ARCH=${stdenv.hostPlatform.linuxArch}" + ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ + "CROSS_COMPILE=${stdenv.cc.targetPrefix}" + ]; + + postPatch = '' + substituteInPlace ./Makefile \ + --replace /lib/modules/ "${kernel.dev}/lib/modules/" \ + --replace '$(shell uname -r)' "${kernel.modDirVersion}" \ + --replace "/sbin/depmod" "#" \ + --replace '$(MODDESTDIR)' "$out/lib/modules/${kernel.modDirVersion}/kernel/net/wireless/" + ''; + + preInstall = '' + mkdir -p "$out/lib/modules/${kernel.modDirVersion}/kernel/net/wireless/" + ''; + + enableParallelBuilding = true; + + meta = { + description = "Linux driver for RTL8723DS."; + homepage = "https://github.com/lwfinger/rtl8723ds"; + license = lib.licenses.gpl2Only; + platforms = lib.platforms.linux; + maintainers = with lib.maintainers; [ chuangzhu ]; + }; +} diff --git a/pkgs/top-level/linux-kernels.nix b/pkgs/top-level/linux-kernels.nix index 766edb74b5e8..b175ea275204 100644 --- a/pkgs/top-level/linux-kernels.nix +++ b/pkgs/top-level/linux-kernels.nix @@ -390,6 +390,8 @@ in { rtl8723bs = callPackage ../os-specific/linux/rtl8723bs { }; + rtl8723ds = callPackage ../os-specific/linux/rtl8723ds { }; + rtl8812au = callPackage ../os-specific/linux/rtl8812au { }; rtl8814au = callPackage ../os-specific/linux/rtl8814au { };