[Backport release-26.05] ethercat: add myself as maintainer, fix license, add kernel modules (#530333)

This commit is contained in:
Alyssa Ross 2026-06-10 12:27:32 +00:00 committed by GitHub
commit 309179e203
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 84 additions and 3 deletions

View file

@ -0,0 +1,70 @@
ethercat:
{
lib,
stdenv,
kernelModuleMakeFlags,
kernel,
}:
let
# Aside from a generic drivers there are special drivers for specific NICs
# (for example r8139, r8169, e100, e1000, e1000e) which are only available
# for these kernel versions
extraSupportedKernel = lib.elem (lib.versions.majorMinor kernel.version) [
"5.10"
"5.14"
"5.15"
"6.1"
"6.4"
"6.12"
];
in
stdenv.mkDerivation {
pname = "ethercat";
version = "${kernel.version}-${ethercat.version}";
__structuredAttrs = true;
enableParallelBuilding = true;
inherit (ethercat) src;
nativeBuildInputs = kernel.moduleBuildDependencies ++ ethercat.nativeBuildInputs;
configureFlags = [
"--with-linux-dir=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
"--enable-userlib=no"
"--enable-tool=no"
"--enable-kernel=yes"
"--enable-ccat=yes"
]
++ lib.optionals extraSupportedKernel [
"--enable-e100=yes"
"--enable-e1000=yes"
"--enable-e1000e=yes"
"--enable-r8169=yes"
"--enable-igb=yes"
]
++ lib.optionals (extraSupportedKernel && lib.versionAtLeast kernel.version "5.14") [
"--enable-igc=yes"
];
makeFlags = kernelModuleMakeFlags ++ [
"INSTALL_MOD_PATH=${placeholder "out"}"
];
buildFlags = [ "modules" ];
installTargets = [ "modules_install" ];
meta = {
description = ethercat.meta.description + " - kernel modules";
inherit (ethercat.meta)
homepage
changelog
license
maintainers
platforms
;
};
}

View file

@ -29,14 +29,23 @@ stdenv.mkDerivation (finalAttrs: {
"--enable-kernel=no"
];
passthru.updateScript = gitUpdater { };
passthru = {
kernelModule = import ./kernel-module.nix finalAttrs.finalPackage;
updateScript = gitUpdater { };
};
meta = {
description = "IgH EtherCAT Master for Linux";
homepage = "https://etherlab.org/ethercat";
changelog = "https://gitlab.com/etherlab.org/ethercat/-/blob/${finalAttrs.version}/NEWS";
license = lib.licenses.gpl2Plus;
maintainers = with lib.maintainers; [ stv0g ];
license = with lib.licenses; [
gpl2Only
lgpl21Only
];
maintainers = with lib.maintainers; [
ninelore
stv0g
];
platforms = [ "x86_64-linux" ];
};
})

View file

@ -332,6 +332,8 @@ in
inherit kernel;
};
ethercat = callPackage pkgs.ethercat.kernelModule { };
evdi = callPackage ../os-specific/linux/evdi { };
fanout = callPackage ../os-specific/linux/fanout { };