diff options
author | lassulus <lassulus@lassul.us> | 2021-03-17 15:42:13 +0100 |
---|---|---|
committer | lassulus <lassulus@lassul.us> | 2021-03-17 15:42:13 +0100 |
commit | 3d1472a7cac3ab2c5f9efd06a501368308681999 (patch) | |
tree | 950fbe49dfd060923756dd517c41f27f646857de /makefu/5pkgs/xmm7360/default.nix | |
parent | f659c1879f6e0a0e9228205edd794aaab467aa0b (diff) | |
parent | 2044ad632b68ce173463287a9f437aae699bda83 (diff) |
Merge remote-tracking branch 'gum/master'
Diffstat (limited to 'makefu/5pkgs/xmm7360/default.nix')
-rw-r--r-- | makefu/5pkgs/xmm7360/default.nix | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/makefu/5pkgs/xmm7360/default.nix b/makefu/5pkgs/xmm7360/default.nix new file mode 100644 index 000000000..5e423b5af --- /dev/null +++ b/makefu/5pkgs/xmm7360/default.nix @@ -0,0 +1,47 @@ +{ stdenv, fetchFromGitHub, python3, kernel, kmod }: +let + py = python3.withPackages (p: [ p.ConfigArgParse p.pyroute2 ]); +in +stdenv.mkDerivation rec { + name = "xmm7360-pci-${version}-${kernel.version}"; + version = "1.0"; + + src = fetchFromGitHub { + owner = "xmm7360"; + repo = "xmm7360-pci"; + rev = "0060149"; + sha256 = "0nr7adlwglpw6hp44x0pq8xhv7kik7nsb8yzbxllvy2v1pinyflv"; + }; + + #sourceRoot = "source/linux/v4l2loopback"; + + buildTargets = "default"; + hardeningDisable = [ "pic" ]; + + nativeBuildInputs = kernel.moduleBuildDependencies; + buildInputs = [ kmod ]; + + + makeFlags = [ + "KVERSION=${kernel.modDirVersion}" + "KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" + "INSTALL_MOD_PATH=$(out)" + ]; + postInstall = '' + install -d $out/lib/xmm7360/ + cp -r rpc/ $out/lib/xmm7360/ + cat > open_xdatachannel <<EOF + cd $out/lib/xmm7360 + exec ${py}/bin/python3 rpc/open_xdatachannel.py $@ + EOF + install -D open_xdatachannel $out/bin/open_xdatachannel + ''; + + meta = with stdenv.lib; { + description = "A kernel module to create V4L2 loopback devices"; + homepage = "https://github.com/aramg/droidcam"; + license = licenses.gpl2; + maintainers = [ maintainers.makefu ]; + platforms = platforms.linux; + }; +} |