linuxPackages.yt6801: init at 1.0.29 (#349513)

This commit is contained in:
Arne Keller 2024-12-18 18:37:25 +01:00 committed by GitHub
commit 57f64aab63
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 58 additions and 0 deletions

View file

@ -0,0 +1,56 @@
{
lib,
stdenv,
fetchzip,
kmod,
kernel,
}:
let
modDestDir = "$(out)/lib/modules/${kernel.modDirVersion}/kernel/drivers/net/ethernet/motorcomm";
in
stdenv.mkDerivation (finalAttrs: {
pname = "yt6801";
version = "1.0.29-20240812";
src =
let
version-split = lib.strings.splitString "-" finalAttrs.version;
versionName = builtins.elemAt version-split 0;
uploadDate = builtins.elemAt version-split 1;
in
fetchzip {
stripRoot = false;
url = "https://www.motor-comm.com/Public/Uploads/uploadfile/files/${uploadDate}/yt6801-linux-driver-${versionName}.zip";
sha256 = "sha256-oz6CeOUN6QWKXxe3WUZljhGDTFArsknjzBuQ4IchGeU=";
};
nativeBuildInputs = kernel.moduleBuildDependencies ++ [ kmod ];
postPatch = ''
substituteInPlace src/Makefile \
--replace-fail "sudo ls -l" "ls -l" \
--replace-fail 'depmod $(shell uname -r)' "" \
--replace-fail 'modprobe $(KFILE)' ""
'';
makeFlags = [
"KERNELRELEASE=${kernel.modDirVersion}"
"KSRC_BASE="
"KSRC=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
"KDST=kernel/drivers/net/ethernet/motorcomm"
"INSTALL_MOD_PATH=${placeholder "out"}"
"ko_dir=${modDestDir}"
"ko_full=${modDestDir}/yt6801.ko.xz"
];
meta = {
homepage = "https://www.motor-comm.com/product/ethernet-control-chip";
description = "YT6801 Gigabit PCIe Ethernet controller chip";
license = lib.licenses.gpl2Plus;
maintainers = with lib.maintainers; [ indexyz ];
platforms = lib.platforms.linux;
sourceProvenance = with lib.sourceTypes; [ fromSource ];
};
})

View file

@ -573,6 +573,8 @@ in {
xpadneo = callPackage ../os-specific/linux/xpadneo { };
yt6801 = callPackage ../os-specific/linux/yt6801 { };
ithc = callPackage ../os-specific/linux/ithc { };
ryzen-smu = callPackage ../os-specific/linux/ryzen-smu { };