summary refs log tree commit diff
path: root/pkgs/os-specific
diff options
context:
space:
mode:
authorWilliam A. Kennington III <william@wkennington.com>2015-09-04 12:05:11 -0700
committerWilliam A. Kennington III <william@wkennington.com>2015-09-04 12:05:11 -0700
commitc6f689f951eb45d9d7ca4a47ca0eeb1949bfe2af (patch)
tree2cbaf9252e99e1e1a446c7842d37ed688915abb5 /pkgs/os-specific
parentb68e45dfa7fc642a9eb93009f9611647160eb02a (diff)
parentc985530a25125a587af2a6b4f02f2d1efb83c765 (diff)
downloadnixpkgs-c6f689f951eb45d9d7ca4a47ca0eeb1949bfe2af.tar
nixpkgs-c6f689f951eb45d9d7ca4a47ca0eeb1949bfe2af.tar.gz
nixpkgs-c6f689f951eb45d9d7ca4a47ca0eeb1949bfe2af.tar.bz2
nixpkgs-c6f689f951eb45d9d7ca4a47ca0eeb1949bfe2af.tar.lz
nixpkgs-c6f689f951eb45d9d7ca4a47ca0eeb1949bfe2af.tar.xz
nixpkgs-c6f689f951eb45d9d7ca4a47ca0eeb1949bfe2af.tar.zst
nixpkgs-c6f689f951eb45d9d7ca4a47ca0eeb1949bfe2af.zip
Merge branch 'master.upstream' into staging.upstream
Diffstat (limited to 'pkgs/os-specific')
-rw-r--r--pkgs/os-specific/linux/kernel/perf.nix7
-rw-r--r--pkgs/os-specific/linux/rtl8812au/default.nix31
2 files changed, 36 insertions, 2 deletions
diff --git a/pkgs/os-specific/linux/kernel/perf.nix b/pkgs/os-specific/linux/kernel/perf.nix
index efd3515ff24..2dcdcdc4a91 100644
--- a/pkgs/os-specific/linux/kernel/perf.nix
+++ b/pkgs/os-specific/linux/kernel/perf.nix
@@ -23,10 +23,13 @@ stdenv.mkDerivation {
   # perf refers both to newt and slang
   # binutils is required for libbfd.
   nativeBuildInputs = [ asciidoc xmlto docbook_xsl docbook_xml_dtd_45 libxslt flex bison ];
-  buildInputs = [ elfutils python perl newt slang pkgconfig libunwind binutils ] ++
+  buildInputs = [ python perl newt slang pkgconfig libunwind binutils ] ++
     stdenv.lib.optional withGtk gtk;
 
-  NIX_CFLAGS_COMPILE = "-Wno-error=cpp";
+  # Note: we don't add elfutils to buildInputs, since it provides a
+  # bad `ld' and other stuff.
+  NIX_CFLAGS_COMPILE = "-I${elfutils}/include -Wno-error=cpp";
+  NIX_CFLAGS_LINK = "-L${elfutils}/lib";
 
   installFlags = "install install-man ASCIIDOC8=1";
 
diff --git a/pkgs/os-specific/linux/rtl8812au/default.nix b/pkgs/os-specific/linux/rtl8812au/default.nix
new file mode 100644
index 00000000000..a16e102bc08
--- /dev/null
+++ b/pkgs/os-specific/linux/rtl8812au/default.nix
@@ -0,0 +1,31 @@
+{ stdenv, fetchFromGitHub, kernel }:
+
+stdenv.mkDerivation rec {
+  name = "rtl8812au-${kernel.version}-${version}";
+  version = "4.2.2-1";
+  
+  src = fetchFromGitHub {
+    owner = "csssuf";
+    repo = "rtl8812au";
+    rev = "874906aec694c800bfc29b146737b88dae767832";
+    sha256 = "14ifhplawipfd6971mxw76dv3ygwc0n8sbz2l3f0vvkin6x88bsj";
+  };
+  
+  patchPhase = ''
+    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/"
+  '';
+  
+  preInstall = ''
+    mkdir -p "$out/lib/modules/${kernel.modDirVersion}/kernel/net/wireless/"
+  '';
+   
+  meta = {
+    description = "Driver for Realtek 802.11ac, rtl8812au, provides the 8812au mod.";
+    homepage = "https://github.com/csssuf/rtl8812au";
+    license = stdenv.lib.licenses.gpl2;
+    platforms = [ "x86_64-linux" "i686-linux" ];
+  };
+}
\ No newline at end of file