summary refs log tree commit diff
path: root/pkgs/os-specific/linux/rtl88x2bu
diff options
context:
space:
mode:
authorBenjamin Saunders <ben.e.saunders@gmail.com>2020-03-07 19:03:14 -0800
committerJon <jonringer@users.noreply.github.com>2020-06-04 12:39:54 -0700
commit38f5fce48aa30e81e99f86543694bae0fd1db52c (patch)
treed553edfce47bc071006e33dbb291f856b54570c7 /pkgs/os-specific/linux/rtl88x2bu
parent3f529586cabc4b32a3d367f5b777983f072fd91a (diff)
downloadnixpkgs-38f5fce48aa30e81e99f86543694bae0fd1db52c.tar
nixpkgs-38f5fce48aa30e81e99f86543694bae0fd1db52c.tar.gz
nixpkgs-38f5fce48aa30e81e99f86543694bae0fd1db52c.tar.bz2
nixpkgs-38f5fce48aa30e81e99f86543694bae0fd1db52c.tar.lz
nixpkgs-38f5fce48aa30e81e99f86543694bae0fd1db52c.tar.xz
nixpkgs-38f5fce48aa30e81e99f86543694bae0fd1db52c.tar.zst
nixpkgs-38f5fce48aa30e81e99f86543694bae0fd1db52c.zip
linuxPackages.rtl88x2bu: init at 2020-05-19
Diffstat (limited to 'pkgs/os-specific/linux/rtl88x2bu')
-rw-r--r--pkgs/os-specific/linux/rtl88x2bu/default.nix38
1 files changed, 38 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/rtl88x2bu/default.nix b/pkgs/os-specific/linux/rtl88x2bu/default.nix
new file mode 100644
index 00000000000..3d461d52556
--- /dev/null
+++ b/pkgs/os-specific/linux/rtl88x2bu/default.nix
@@ -0,0 +1,38 @@
+{ stdenv, fetchFromGitHub, kernel, bc }:
+
+stdenv.mkDerivation rec {
+  name = "rtl88x2bu-${kernel.version}-${version}";
+  version = "unstable-2020-05-19";
+
+  src = fetchFromGitHub {
+    owner = "cilynx";
+    repo = "rtl88x2BU";
+    rev = "0f159d7cd937a12b818121cb1f1c4910bd1adc72";
+    sha256 = "0flqnvzfdb4wsiiqv9vf5gfwd5fgpjvhs9zhqknnv1cmp8msgw6y";
+  };
+
+  hardeningDisable = [ "pic" ];
+
+  nativeBuildInputs = [ bc ];
+  buildInputs = kernel.moduleBuildDependencies;
+
+  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 stdenv.lib; {
+    description = "Realtek rtl88x2bu driver";
+    homepage = "https://github.com/cilynx/rtl88x2bu";
+    license = licenses.gpl2;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.ralith ];
+  };
+}