Files
nixpkgs/pkgs/os-specific/linux/nullfs/default.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

49 lines
1.2 KiB
Nix

{
stdenv,
lib,
fetchFromGitHub,
kernel,
kernelModuleMakeFlags,
}:
stdenv.mkDerivation rec {
pname = "nullfs";
version = "0.21";
src = fetchFromGitHub {
owner = "abbbi";
repo = "nullfsvfs";
rev = "v${version}";
sha256 = "sha256-csEfgXOXrFgWcyKmxEPKi33M7nVVI2hE+YGXMe4vdFE=";
};
hardeningDisable = [ "pic" ];
enableParallelBuilding = true;
nativeBuildInputs = kernel.moduleBuildDependencies;
makeFlags = kernelModuleMakeFlags ++ [
"KSRC=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
];
prePatch = ''
substituteInPlace "Makefile" \
--replace-fail "/lib/modules/\$(shell uname -r)/build" "\$(KSRC)"
'';
installPhase = ''
runHook preInstall
mkdir -p "$out/lib/modules/${kernel.modDirVersion}/kernel/fs/nullfs/"
install -p -m 644 nullfs.ko $out/lib/modules/${kernel.modDirVersion}/kernel/fs/nullfs/
runHook postInstall
'';
meta = {
description = "Virtual black hole file system that behaves like /dev/null";
homepage = "https://github.com/abbbi/nullfsvfs";
license = lib.licenses.gpl3;
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [ callumio ];
};
}