From 884e6a7b9fbea0e776e199ed4c11d36f2f3dedb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6gler?= Date: Mon, 23 Apr 2018 23:54:04 +0200 Subject: [PATCH 1/3] tbs: updated to kernel-4.14 * updated meta data * fix concurrent names for fetchFromGitHub derivations --- pkgs/os-specific/linux/tbs/default.nix | 28 +++++++++++++++++--------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/pkgs/os-specific/linux/tbs/default.nix b/pkgs/os-specific/linux/tbs/default.nix index e4b954d4dbf5..db20a7ab8211 100644 --- a/pkgs/os-specific/linux/tbs/default.nix +++ b/pkgs/os-specific/linux/tbs/default.nix @@ -1,19 +1,24 @@ -{ stdenv, fetchFromGitHub, kernel, kmod, perl, patchutils, perlPackages }: +{ stdenv, lib, fetchFromGitHub, kernel, kmod, perl, patchutils, perlPackages, libelf }: let - media = fetchFromGitHub { + + media = fetchFromGitHub rec { + name = repo; owner = "tbsdtv"; repo = "linux_media"; - rev = "14ebbec91f2cd0423aaf859fc6e6d5d986397cd4"; - sha256 = "1cmqj3kby8sxfcpvslbxywr95529vjxzbn800fdp35lka1fv962h"; + rev = "efe31531b77efd3a4c94516504a5823d31cdc776"; + sha256 = "1533qi3sb91v00289hl5zaj4l35r2sf9fqc6z5ky1vbb7byxgnlr"; }; - build = fetchFromGitHub { + + build = fetchFromGitHub rec { + name = repo; owner = "tbsdtv"; repo = "media_build"; - rev = "c340e29a4047e43f7ea7ebf19e1e28c1f2112d05"; - sha256 = "0hfn1j9qk8lh30z3ywj22qky480nsf8z2iag2bqhrhy4375vjlbl"; + rev = "a0d62eba4d429e0e9d2c2f910fb203e817cac84b"; + sha256 = "1329s7w9xlqjqwkpaqsd6b5dmzhm97jw0c7c7zzmmbdkl289i4i4"; }; + in stdenv.mkDerivation { - name = "tbs-2017-11-05-${kernel.version}"; + name = "tbs-2018.04.18-${kernel.version}"; srcs = [ media build ]; sourceRoot = "${build.name}"; @@ -39,10 +44,13 @@ in stdenv.mkDerivation { installFlags = [ "DESTDIR=$(out)" ]; hardeningDisable = [ "pic" "format" ]; - nativeBuildInputs = [ patchutils kmod perl perlPackages.ProcProcessTable ]; - meta = with stdenv.lib; { + nativeBuildInputs = [ patchutils kmod perl perlPackages.ProcProcessTable ] + ++ lib.optional (lib.versionAtLeast kernel.version "4.14") [ libelf ]; + + meta = with lib; { homepage = https://www.tbsdtv.com/; + description = "Linux driver for TBSDTV cards"; license = licenses.gpl2; maintainers = with maintainers; [ ck3d ]; priority = 20; From 8446ba26a8f098c98d06b24acce7588eac63eb1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6gler?= Date: Mon, 30 Apr 2018 16:55:27 +0200 Subject: [PATCH 2/3] added lost entry in all-packages.nix --- pkgs/top-level/all-packages.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index cac46ff0f4cc..7f035ad89b4c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -13508,6 +13508,8 @@ with pkgs; broadcom_sta = callPackage ../os-specific/linux/broadcom-sta/default.nix { }; + tbs = callPackage ../os-specific/linux/tbs { }; + nvidiabl = callPackage ../os-specific/linux/nvidiabl { }; nvidiaPackages = callPackage ../os-specific/linux/nvidia-x11 { }; From 9b99738c84dfc5a66ec4e9aee1a30afc580a3cb8 Mon Sep 17 00:00:00 2001 From: goibhniu Date: Wed, 2 May 2018 15:03:39 +0200 Subject: [PATCH 3/3] tbs: override the kernel dvb-core.ko and videodev.ko Otherwise the kernel versions of dvb-core.ko and videodev.ko get loaded instead of the versions from this package. --- pkgs/os-specific/linux/tbs/default.nix | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/pkgs/os-specific/linux/tbs/default.nix b/pkgs/os-specific/linux/tbs/default.nix index db20a7ab8211..291666c0b450 100644 --- a/pkgs/os-specific/linux/tbs/default.nix +++ b/pkgs/os-specific/linux/tbs/default.nix @@ -43,16 +43,21 @@ in stdenv.mkDerivation { buildFlags = [ "VER=${kernel.modDirVersion}" ]; installFlags = [ "DESTDIR=$(out)" ]; - hardeningDisable = [ "pic" "format" ]; + hardeningDisable = [ "all" ]; nativeBuildInputs = [ patchutils kmod perl perlPackages.ProcProcessTable ] - ++ lib.optional (lib.versionAtLeast kernel.version "4.14") [ libelf ]; + ++ kernel.moduleBuildDependencies; + + postInstall = '' + xz $out/lib/modules/${kernel.modDirVersion}/kernel/drivers/media/dvb-core/dvb-core.ko + xz $out/lib/modules/${kernel.modDirVersion}/kernel/drivers/media/v4l2-core/videodev.ko + ''; meta = with lib; { homepage = https://www.tbsdtv.com/; description = "Linux driver for TBSDTV cards"; license = licenses.gpl2; maintainers = with maintainers; [ ck3d ]; - priority = 20; + priority = -1; }; }