2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, kernel, kmod }:
|
2014-03-31 18:02:25 +00:00
|
|
|
|
2023-12-07 11:44:50 +00:00
|
|
|
stdenv.mkDerivation {
|
2021-06-06 04:59:18 +00:00
|
|
|
pname = "v4l2loopback";
|
2024-03-13 10:08:26 +00:00
|
|
|
version = "0.12.7-unstable-2024-02-12-${kernel.version}";
|
2014-03-31 18:02:25 +00:00
|
|
|
|
2018-03-28 20:12:32 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "umlaeute";
|
|
|
|
repo = "v4l2loopback";
|
2024-03-13 10:08:26 +00:00
|
|
|
rev = "5d72c17f92ee0e38efbb7eb85e34443ecbf1a80c";
|
|
|
|
hash = "sha256-ggmYH5MUXhMPvA8UZ2EAG+eGoPTNbw7B8UxmmgP6CsE=";
|
2014-03-31 18:02:25 +00:00
|
|
|
};
|
2016-02-07 22:43:01 +00:00
|
|
|
|
2016-02-26 17:38:15 +00:00
|
|
|
hardeningDisable = [ "format" "pic" ];
|
2016-02-07 22:43:01 +00:00
|
|
|
|
2014-03-31 18:02:25 +00:00
|
|
|
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
|
|
|
|
2022-02-10 02:46:46 +00:00
|
|
|
nativeBuildInputs = [ kmod ] ++ kernel.moduleBuildDependencies;
|
2016-02-07 22:43:01 +00:00
|
|
|
|
2021-08-16 11:33:38 +00:00
|
|
|
postInstall = ''
|
|
|
|
make install-utils PREFIX=$bin
|
|
|
|
'';
|
|
|
|
|
|
|
|
outputs = [ "out" "bin" ];
|
|
|
|
|
2022-02-10 02:46:46 +00:00
|
|
|
makeFlags = kernel.makeFlags ++ [
|
2014-03-31 18:02:25 +00:00
|
|
|
"KERNELRELEASE=${kernel.modDirVersion}"
|
|
|
|
"KERNEL_DIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
|
|
|
|
];
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2014-04-02 10:40:52 +00:00
|
|
|
description = "A kernel module to create V4L2 loopback devices";
|
2024-03-19 02:14:51 +00:00
|
|
|
mainProgram = "v4l2loopback-ctl";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/umlaeute/v4l2loopback";
|
2021-06-06 04:59:18 +00:00
|
|
|
license = licenses.gpl2Only;
|
2023-11-17 10:03:27 +00:00
|
|
|
maintainers = with maintainers; [ moni ];
|
2014-03-31 18:02:25 +00:00
|
|
|
platforms = platforms.linux;
|
2021-08-19 15:23:39 +00:00
|
|
|
outputsToInstall = [ "out" ];
|
2014-03-31 18:02:25 +00:00
|
|
|
};
|
|
|
|
}
|