mirror of
https://github.com/bartvdbraak/dotfiles.git
synced 2025-06-29 04:39:10 +00:00
working example for now
This commit is contained in:
parent
f87cbd8ad9
commit
fd8292cd41
4 changed files with 153 additions and 101 deletions
51
nixos/hardware/yt6801.nix
Normal file
51
nixos/hardware/yt6801.nix
Normal file
|
@ -0,0 +1,51 @@
|
|||
{
|
||||
kernel,
|
||||
stdenv,
|
||||
lib,
|
||||
fetchzip,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "yt6801";
|
||||
version = "1.0.29";
|
||||
|
||||
src = fetchzip {
|
||||
url = "https://www.motor-comm.com/Public/Uploads/uploadfile/files/20240812/yt6801-linux-driver-1.0.29.zip";
|
||||
sha256 = "sha256-oz6CeOUN6QWKXxe3WUZljhGDTFArsknjzBuQ4IchGeU=";
|
||||
stripRoot = false;
|
||||
};
|
||||
|
||||
nativeBuildInputs = kernel.moduleBuildDependencies;
|
||||
|
||||
preConfigure = "cd src";
|
||||
|
||||
configurePhase = "true";
|
||||
|
||||
buildFlags = [ "modules" ];
|
||||
|
||||
makeFlags =
|
||||
[
|
||||
"ARCH=${stdenv.hostPlatform.linuxArch}"
|
||||
"KSRC=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
|
||||
]
|
||||
++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
|
||||
"CROSS_COMPILE=${stdenv.cc.targetPrefix}"
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/lib/modules/${kernel.modDirVersion}/kernel/drivers/net/ethernet/motorcomm
|
||||
cp src/yt6801.ko $out/lib/modules/${kernel.modDirVersion}/kernel/drivers/net/ethernet/motorcomm/
|
||||
'';
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Motorcomm yt6801 Network Interface Card driver";
|
||||
homepage = "https://www.motor-comm.com/product/ethernet-control-chip";
|
||||
license = with licenses; [
|
||||
gpl2Plus
|
||||
gpl2Only
|
||||
];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue