-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #130 from epics-extensions/backport/112-to-nixos-2…
…3.11 [Backport nixos-23.11] linuxPackages.mrf: init at 2.6.0
- Loading branch information
Showing
4 changed files
with
61 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
{ | ||
stdenv, | ||
lib, | ||
kernel, | ||
epnix, | ||
}: | ||
stdenv.mkDerivation (finalAttrs: { | ||
pname = "mrf-driver"; | ||
|
||
inherit (epnix.support.mrfioc2) version src; | ||
|
||
# Needed for kernel modules | ||
hardeningDisable = ["format" "pic"]; | ||
|
||
nativeBuildInputs = kernel.moduleBuildDependencies; | ||
|
||
enableParallelBuilding = true; | ||
|
||
setSourceRoot = '' | ||
export sourceRoot="$(pwd)/${finalAttrs.src.name}/mrmShared/linux"; | ||
''; | ||
|
||
makeFlags = | ||
kernel.makeFlags | ||
++ [ | ||
"-C" | ||
"${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" | ||
"KERNELRELEASE=${kernel.modDirVersion}" | ||
"INSTALL_MOD_PATH=$(out)" | ||
"VERSION=${finalAttrs.version}" | ||
"M=$(sourceRoot)" | ||
# Uncomment this line to enable debugging | ||
# "KCFLAGS=-DDBG" | ||
]; | ||
|
||
buildFlags = ["modules"]; | ||
installTargets = ["modules_install"]; | ||
|
||
meta = { | ||
description = "MRF kernel driver"; | ||
inherit (epnix.support.mrfioc2.meta) homepage license maintainers; | ||
}; | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# For packages that are not directly exposed to the user, | ||
# but should still work. | ||
# | ||
# For example kernel modules, which depend on the kernel version, | ||
# or Python libraries, which depend on the Python version. | ||
{pkgs, ...}: { | ||
mrf-driver-default-linux = pkgs.linuxPackages.mrf; | ||
} |