Merge pull request #32049 from ck3d/tbs

initial TBS driver
This commit is contained in:
Matthew Justin Bauer 2018-04-22 13:03:22 -05:00 committed by GitHub
commit fb7cdbc15d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 52 additions and 0 deletions

View File

@ -0,0 +1,50 @@
{ stdenv, fetchFromGitHub, kernel, kmod, perl, patchutils, perlPackages }:
let
media = fetchFromGitHub {
owner = "tbsdtv";
repo = "linux_media";
rev = "14ebbec91f2cd0423aaf859fc6e6d5d986397cd4";
sha256 = "1cmqj3kby8sxfcpvslbxywr95529vjxzbn800fdp35lka1fv962h";
};
build = fetchFromGitHub {
owner = "tbsdtv";
repo = "media_build";
rev = "c340e29a4047e43f7ea7ebf19e1e28c1f2112d05";
sha256 = "0hfn1j9qk8lh30z3ywj22qky480nsf8z2iag2bqhrhy4375vjlbl";
};
in stdenv.mkDerivation {
name = "tbs-2017-11-05-${kernel.version}";
srcs = [ media build ];
sourceRoot = "${build.name}";
preConfigure = ''
make dir DIR=../${media.name}
'';
postPatch = ''
patchShebangs .
sed -i v4l/Makefile \
-i v4l/scripts/make_makefile.pl \
-e 's,/sbin/depmod,${kmod}/bin/depmod,g' \
-e 's,/sbin/lsmod,${kmod}/bin/lsmod,g'
sed -i v4l/Makefile \
-e 's,^OUTDIR ?= /lib/modules,OUTDIR ?= ${kernel.dev}/lib/modules,' \
-e 's,^SRCDIR ?= /lib/modules,SRCDIR ?= ${kernel.dev}/lib/modules,'
'';
buildFlags = [ "VER=${kernel.modDirVersion}" ];
installFlags = [ "DESTDIR=$(out)" ];
hardeningDisable = [ "pic" "format" ];
nativeBuildInputs = [ patchutils kmod perl perlPackages.ProcProcessTable ];
meta = with stdenv.lib; {
homepage = https://www.tbsdtv.com/;
license = licenses.gpl2;
maintainers = with maintainers; [ ck3d ];
priority = 20;
};
}

View File

@ -13501,6 +13501,8 @@ with pkgs;
broadcom_sta = callPackage ../os-specific/linux/broadcom-sta/default.nix { }; broadcom_sta = callPackage ../os-specific/linux/broadcom-sta/default.nix { };
tbs = callPackage ../os-specific/linux/tbs { };
nvidiabl = callPackage ../os-specific/linux/nvidiabl { }; nvidiabl = callPackage ../os-specific/linux/nvidiabl { };
nvidiaPackages = callPackage ../os-specific/linux/nvidia-x11 { }; nvidiaPackages = callPackage ../os-specific/linux/nvidia-x11 { };