summaryrefslogtreecommitdiff
path: root/overlays
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2021-03-27 18:46:45 +0100
committerGregor Kleen <gkleen@yggdrasil.li>2021-03-27 18:46:45 +0100
commit6021a9e22f99bb9b19134e2cb443bdeba852edc6 (patch)
tree398720cbb8a601553900866031ba3f093e051106 /overlays
parente203311de813949dec992b76b04410068768eaf5 (diff)
downloadnixos-6021a9e22f99bb9b19134e2cb443bdeba852edc6.tar
nixos-6021a9e22f99bb9b19134e2cb443bdeba852edc6.tar.gz
nixos-6021a9e22f99bb9b19134e2cb443bdeba852edc6.tar.bz2
nixos-6021a9e22f99bb9b19134e2cb443bdeba852edc6.tar.xz
nixos-6021a9e22f99bb9b19134e2cb443bdeba852edc6.zip
Diffstat (limited to 'overlays')
-rw-r--r--overlays/v4l2loopback.nix37
1 files changed, 37 insertions, 0 deletions
diff --git a/overlays/v4l2loopback.nix b/overlays/v4l2loopback.nix
new file mode 100644
index 00000000..335f86a3
--- /dev/null
+++ b/overlays/v4l2loopback.nix
@@ -0,0 +1,37 @@
1final: prev: {
2 linuxPackages_latest = prev.linuxPackages_latest.extend (self: super: {
3 v4l2loopback = super.stdenv.mkDerivation rec {
4 name = "v4l2loopback-${version}-${self.kernel.version}";
5 version = "f62fb9076b6313e5eb82fdcaceadb6b3052f346e";
6
7 src = prev.fetchFromGitHub {
8 owner = "umlaeute";
9 repo = "v4l2loopback";
10 rev = "${version}";
11 sha256 = "VRFtimQQtT8vd1dx5KtUDkmXo3DSOybhNLcAIxQba44=";
12 fetchSubmodules = true;
13 };
14
15 hardeningDisable = [ "format" "pic" ];
16
17 preBuild = ''
18 substituteInPlace Makefile --replace "modules_install" "INSTALL_MOD_PATH=$out modules_install"
19 sed -i '/depmod/d' Makefile
20 export PATH=${final.kmod}/sbin:$PATH
21 '';
22
23 nativeBuildInputs = self.kernel.moduleBuildDependencies;
24 buildInputs = [ final.kmod ];
25
26 makeFlags = [
27 "KERNELRELEASE=${self.kernel.modDirVersion}"
28 "KERNEL_DIR=${self.kernel.dev}/lib/modules/${self.kernel.modDirVersion}/build"
29 ];
30
31 postInstall = ''
32 mkdir -p $out/bin
33 install -m0755 utils/v4l2loopback-ctl $out/bin
34 '';
35 };
36 });
37}