Files
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

40 lines
1.1 KiB
Nix

{
lib,
fetchFromGitHub,
kernel,
kernelModuleMakeFlags,
unstableGitUpdater,
}:
kernel.stdenv.mkDerivation {
pname = "rust-out-of-tree-module";
version = "0-unstable-2024-05-06";
src = fetchFromGitHub {
owner = "Rust-for-linux";
repo = "rust-out-of-tree-module";
rev = "9872947486bb8f60b0d11db15d546a3d06156ec5";
hash = "sha256-TzCySY7uQac98dU+Nu5dC4Usm7oG0iIdZZmZgAOpni4=";
};
nativeBuildInputs = kernel.moduleBuildDependencies;
makeFlags = kernelModuleMakeFlags ++ [
"KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
];
installFlags = [ "INSTALL_MOD_PATH=${placeholder "out"}" ];
installTargets = [ "modules_install" ];
passthru.updateScript = unstableGitUpdater { };
meta = {
broken = !kernel.withRust;
description = "Basic template for an out-of-tree Linux kernel module written in Rust";
homepage = "https://github.com/Rust-for-Linux/rust-out-of-tree-module";
license = lib.licenses.gpl2Only;
maintainers = [ lib.maintainers.blitz ];
platforms = [ "x86_64-linux" ] ++ lib.optional (kernel.kernelAtLeast "6.9") "aarch64-linux";
};
}