2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, kernel, kmod }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
stdenv.mkDerivation {
|
2021-06-28 23:13:55 +00:00
|
|
|
pname = "v4l2loopback";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "0.12.7-unstable-2024-02-12-${kernel.version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "umlaeute";
|
|
|
|
repo = "v4l2loopback";
|
2024-04-21 15:54:59 +00:00
|
|
|
rev = "5d72c17f92ee0e38efbb7eb85e34443ecbf1a80c";
|
|
|
|
hash = "sha256-ggmYH5MUXhMPvA8UZ2EAG+eGoPTNbw7B8UxmmgP6CsE=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
hardeningDisable = [ "format" "pic" ];
|
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
substituteInPlace Makefile --replace "modules_install" "INSTALL_MOD_PATH=$out modules_install"
|
|
|
|
sed -i '/depmod/d' Makefile
|
|
|
|
'';
|
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
nativeBuildInputs = [ kmod ] ++ kernel.moduleBuildDependencies;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-08-18 13:19:15 +00:00
|
|
|
postInstall = ''
|
|
|
|
make install-utils PREFIX=$bin
|
|
|
|
'';
|
|
|
|
|
|
|
|
outputs = [ "out" "bin" ];
|
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
makeFlags = kernel.makeFlags ++ [
|
2020-04-24 23:36:52 +00:00
|
|
|
"KERNELRELEASE=${kernel.modDirVersion}"
|
|
|
|
"KERNEL_DIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
|
|
|
|
];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Kernel module to create V4L2 loopback devices";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "v4l2loopback-ctl";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/umlaeute/v4l2loopback";
|
2021-06-28 23:13:55 +00:00
|
|
|
license = licenses.gpl2Only;
|
2024-01-02 11:29:13 +00:00
|
|
|
maintainers = with maintainers; [ moni ];
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.linux;
|
2021-08-22 07:53:02 +00:00
|
|
|
outputsToInstall = [ "out" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|