nixpkgs/pkgs/os-specific/linux/v4l2loopback/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

43 lines
1.1 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchFromGitHub, kernel, kmod }:
stdenv.mkDerivation {
pname = "v4l2loopback";
version = "unstable-2023-11-23-${kernel.version}";
src = fetchFromGitHub {
owner = "umlaeute";
repo = "v4l2loopback";
rev = "850a2e36849f6ad3c9bf74f2ae3f603452bd8a71";
hash = "sha256-LqP5R3oKbjUQUfDZUWpkrmyopWhOt4wlgSgGywTPJXM=";
};
hardeningDisable = [ "format" "pic" ];
preBuild = ''
substituteInPlace Makefile --replace "modules_install" "INSTALL_MOD_PATH=$out modules_install"
sed -i '/depmod/d' Makefile
'';
2014-12-10 11:23:11 +00:00
nativeBuildInputs = [ kmod ] ++ kernel.moduleBuildDependencies;
postInstall = ''
make install-utils PREFIX=$bin
'';
outputs = [ "out" "bin" ];
makeFlags = kernel.makeFlags ++ [
"KERNELRELEASE=${kernel.modDirVersion}"
"KERNEL_DIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
];
meta = with lib; {
2014-04-02 10:40:52 +00:00
description = "A kernel module to create V4L2 loopback devices";
homepage = "https://github.com/umlaeute/v4l2loopback";
license = licenses.gpl2Only;
2023-11-17 10:03:27 +00:00
maintainers = with maintainers; [ moni ];
platforms = platforms.linux;
outputsToInstall = [ "out" ];
};
}