mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-06-05 21:03:40 +00:00
Add MDIO tools and netlink out-of-tree kernel module (#456896)
This commit is contained in:
41
pkgs/by-name/md/mdio-tools/package.nix
Normal file
41
pkgs/by-name/md/mdio-tools/package.nix
Normal file
@@ -0,0 +1,41 @@
|
||||
{
|
||||
autoreconfHook,
|
||||
fetchFromGitHub,
|
||||
lib,
|
||||
libmnl,
|
||||
pkg-config,
|
||||
stdenv,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "mdio-tools";
|
||||
version = "1.3.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "wkz";
|
||||
repo = "mdio-tools";
|
||||
tag = finalAttrs.version;
|
||||
hash = "sha256-NomChJrYwMDPXNw5r2p11kGfYUvJBHCdLXy1SA8kOaM=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
autoreconfHook
|
||||
pkg-config
|
||||
];
|
||||
buildInputs = [ libmnl ];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace configure.ac \
|
||||
--replace-fail "git describe --always --dirty --tags" "echo ${finalAttrs.version}"
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Low-level debug tools for MDIO devices";
|
||||
homepage = "https://github.com/wkz/mdio-tools";
|
||||
changelog = "https://github.com/wkz/mdio-tools/blob/${finalAttrs.src.rev}/ChangeLog.md";
|
||||
license = lib.licenses.gpl2Only;
|
||||
maintainers = [ lib.maintainers.jmbaur ];
|
||||
mainProgram = "mdio";
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
})
|
||||
29
pkgs/os-specific/linux/mdio-netlink/default.nix
Normal file
29
pkgs/os-specific/linux/mdio-netlink/default.nix
Normal file
@@ -0,0 +1,29 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
kernel,
|
||||
mdio-tools,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "mdio-netlink";
|
||||
version = "${mdio-tools.version}-${kernel.version}";
|
||||
|
||||
inherit (mdio-tools) src;
|
||||
sourceRoot = "source/kernel";
|
||||
|
||||
nativeBuildInputs = kernel.moduleBuildDependencies;
|
||||
|
||||
makeFlags = kernel.commonMakeFlags ++ [
|
||||
"KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
|
||||
"INSTALL_MOD_PATH=${placeholder "out"}"
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "Netlink support for MDIO devices";
|
||||
homepage = "https://github.com/wkz/mdio-tools";
|
||||
license = lib.licenses.gpl2Only;
|
||||
maintainers = [ lib.maintainers.jmbaur ];
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
@@ -566,6 +566,8 @@ in
|
||||
|
||||
mba6x_bl = callPackage ../os-specific/linux/mba6x_bl { };
|
||||
|
||||
mdio-netlink = callPackage ../os-specific/linux/mdio-netlink { };
|
||||
|
||||
mwprocapture = callPackage ../os-specific/linux/mwprocapture { };
|
||||
|
||||
mxu11x0 = callPackage ../os-specific/linux/mxu11x0 { };
|
||||
|
||||
Reference in New Issue
Block a user