nixpkgs/pkgs/os-specific/linux/rtl88x2bu/default.nix
Otavio Salvador acd926d3d1 rtl88x2bu: add myself on maintainers list
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
2023-05-04 08:12:45 -03:00

40 lines
1.1 KiB
Nix

{ lib, stdenv, fetchFromGitHub, kernel, bc }:
stdenv.mkDerivation rec {
pname = "rtl88x2bu";
version = "${kernel.version}-unstable-2023-03-17";
src = fetchFromGitHub {
owner = "morrownr";
repo = "88x2bu-20210702";
rev = "f0a2c9c74045cf2c3701084f389e358f9236fc8c";
sha256 = "sha256-hquLmEOzdBQ6rJld5kkzVw+hXBFb/ZwpBI0eL0rUrkM=";
};
hardeningDisable = [ "pic" ];
nativeBuildInputs = [ bc ] ++ kernel.moduleBuildDependencies;
makeFlags = kernel.makeFlags;
prePatch = ''
substituteInPlace ./Makefile \
--replace /lib/modules/ "${kernel.dev}/lib/modules/" \
--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 = with lib; {
description = "Realtek rtl88x2bu driver";
homepage = "https://github.com/morrownr/88x2bu-20210702";
license = licenses.gpl2Only;
platforms = platforms.linux;
maintainers = with maintainers; [ otavio ralith ];
};
}