summary refs log tree commit diff
path: root/pkgs/os-specific/linux/r8125
diff options
context:
space:
mode:
authorpeelz <LouisTakePILLz@users.noreply.github.com>2020-03-05 19:42:23 -0500
committerJon <jonringer@users.noreply.github.com>2020-03-10 10:37:15 -0700
commit3eea746d74d1fdfa57eef62b9159f5a51f23562a (patch)
tree7f441d639967efd298db4298bcc7e9b99bfb6bf4 /pkgs/os-specific/linux/r8125
parent770329ac76cf80d4e509b329a656c84b87304e88 (diff)
downloadnixpkgs-3eea746d74d1fdfa57eef62b9159f5a51f23562a.tar
nixpkgs-3eea746d74d1fdfa57eef62b9159f5a51f23562a.tar.gz
nixpkgs-3eea746d74d1fdfa57eef62b9159f5a51f23562a.tar.bz2
nixpkgs-3eea746d74d1fdfa57eef62b9159f5a51f23562a.tar.lz
nixpkgs-3eea746d74d1fdfa57eef62b9159f5a51f23562a.tar.xz
nixpkgs-3eea746d74d1fdfa57eef62b9159f5a51f23562a.tar.zst
nixpkgs-3eea746d74d1fdfa57eef62b9159f5a51f23562a.zip
r8125: init at 9.003.02
Diffstat (limited to 'pkgs/os-specific/linux/r8125')
-rw-r--r--pkgs/os-specific/linux/r8125/default.nix45
1 files changed, 45 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/r8125/default.nix b/pkgs/os-specific/linux/r8125/default.nix
new file mode 100644
index 00000000000..a837b226138
--- /dev/null
+++ b/pkgs/os-specific/linux/r8125/default.nix
@@ -0,0 +1,45 @@
+{ stdenv, lib, fetchFromGitHub, kernel }:
+
+stdenv.mkDerivation rec {
+  pname = "r8125";
+  # On update please verify (using `diff -r`) that the source matches the
+  # realtek version.
+  version = "9.003.02";
+
+  # This is a mirror. The original website[1] doesn't allow non-interactive
+  # downloads, instead emailing you a download link.
+  # [1] https://www.realtek.com/en/component/zoo/category/network-interface-controllers-10-100-1000m-gigabit-ethernet-pci-express-software
+  src = fetchFromGitHub {
+    owner = "ibmibmibm";
+    repo = "r8125";
+    rev = "${version}";
+    sha256 = "09ip17x8nhcpxkkhyyawkmd10n73j2ffh1i2nmsr7l3jfq7f9zac";
+  };
+
+  hardeningDisable = [ "pic" ];
+
+  nativeBuildInputs = kernel.moduleBuildDependencies;
+
+  preBuild = ''
+    substituteInPlace src/Makefile --replace "BASEDIR :=" "BASEDIR ?="
+    substituteInPlace src/Makefile --replace "modules_install" "INSTALL_MOD_PATH=$out modules_install"
+  '';
+
+  makeFlags = [
+    "BASEDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}"
+  ];
+
+  buildFlags = [ "modules" ];
+
+  meta = with lib; {
+    homepage = "https://github.com/ibmibmibm/r8125";
+    downloadPage = "https://www.realtek.com/en/component/zoo/category/network-interface-controllers-10-100-1000m-gigabit-ethernet-pci-express-software";
+    description = "Realtek r8125 driver";
+    longDescription = ''
+      A kernel module for Realtek 8125 2.5G network cards.
+    '';
+    license = licenses.gpl2Plus;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ peelz ];
+  };
+}