mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-04 19:45:54 +00:00
4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
40 lines
1.1 KiB
Nix
40 lines
1.1 KiB
Nix
{ lib, stdenv, fetchFromGitHub, kernel }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
name = "rtl8814au-${kernel.version}-${version}";
|
|
version = "4.3.21";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "zebulon2";
|
|
repo = "rtl8814au";
|
|
rev = "a58c56a5a6cb99ffb872f07cb67b68197911854f";
|
|
sha256 = "1ffm67da183nz009gm5v9w1bab081hrm113kk8knl9s5qbqnn13q";
|
|
};
|
|
|
|
buildInputs = kernel.moduleBuildDependencies;
|
|
|
|
hardeningDisable = [ "pic" ];
|
|
|
|
NIX_CFLAGS_COMPILE="-Wno-error=incompatible-pointer-types";
|
|
|
|
prePatch = ''
|
|
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/"
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Realtek 8814AU USB WiFi driver";
|
|
homepage = "https://github.com/zebulon2/rtl8814au";
|
|
license = licenses.gpl2;
|
|
maintainers = [ maintainers.lassulus ];
|
|
platforms = [ "x86_64-linux" "i686-linux" ];
|
|
};
|
|
}
|