From 0c6a46339da073178412094489ad7389c35ce419 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hl=C3=B6=C3=B0ver=20Sigur=C3=B0sson?= Date: Sun, 14 Feb 2021 09:07:41 +0100 Subject: [PATCH 1/7] mbp2018-bridge-drv: init at 0.001 --- .../mbp2018-bridge-drv/default.nix | 34 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 36 insertions(+) create mode 100644 pkgs/os-specific/linux/mbp-modules/mbp2018-bridge-drv/default.nix diff --git a/pkgs/os-specific/linux/mbp-modules/mbp2018-bridge-drv/default.nix b/pkgs/os-specific/linux/mbp-modules/mbp2018-bridge-drv/default.nix new file mode 100644 index 000000000000..c2d6130623a2 --- /dev/null +++ b/pkgs/os-specific/linux/mbp-modules/mbp2018-bridge-drv/default.nix @@ -0,0 +1,34 @@ +{ lib, stdenv, kernel, fetchFromGitHub, }: + +stdenv.mkDerivation rec { + name = "mbp2018-bridge-drv"; + version = "b43fcc069da73e051072fde24af4014c9c487286"; + + src = fetchFromGitHub { + owner = "MCMrARM"; + repo = "mbp2018-bridge-drv"; + rev = "0.01"; + sha256 = "0ac2l51ybfrvg8m36x67rsvgjqs1vwp7c89ssvbjkrcq3y4qdb53"; + }; + + buildPhase = '' + make -C ${kernel.dev}/lib/modules/${kernel.modDirVersion}/build \ + M=$(pwd) modules + ''; + + installPhase = '' + make -C ${kernel.dev}/lib/modules/${kernel.modDirVersion}/build \ + INSTALL_MOD_PATH=$out M=$(pwd) modules_install + ''; + + meta = with lib; { + description = "A driver for MacBook models 2018 and newer, which makes the keyboard, mouse and audio output work."; + longDescription = '' + A driver for MacBook models 2018 and newer, implementing the VHCI (required for mouse/keyboard/etc.) and audio functionality. + ''; + homepage = "https://github.com/MCMrARM/mbp2018-bridge-drv"; + license = lib.licenses.gpl2; + platforms = platforms.linux; + maintainers = [ ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ae97256b7d51..056939a29da7 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -19245,6 +19245,8 @@ in tbs = callPackage ../os-specific/linux/tbs { }; + mbp2018-bridge-drv = callPackage ../os-specific/linux/mbp-modules/mbp2018-bridge-drv { inherit kernel; }; + nvidiabl = callPackage ../os-specific/linux/nvidiabl { }; nvidiaPackages = dontRecurseIntoAttrs (callPackage ../os-specific/linux/nvidia-x11 { }); From 57481c94079a47d3ca6d28fa21cf1e6e88fdbcb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hl=C3=B6=C3=B0ver=20Sigur=C3=B0sson?= Date: Sun, 14 Feb 2021 09:15:38 +0100 Subject: [PATCH 2/7] Update pkgs/os-specific/linux/mbp-modules/mbp2018-bridge-drv/default.nix Co-authored-by: Sandro --- .../linux/mbp-modules/mbp2018-bridge-drv/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/os-specific/linux/mbp-modules/mbp2018-bridge-drv/default.nix b/pkgs/os-specific/linux/mbp-modules/mbp2018-bridge-drv/default.nix index c2d6130623a2..204f21a5e9ee 100644 --- a/pkgs/os-specific/linux/mbp-modules/mbp2018-bridge-drv/default.nix +++ b/pkgs/os-specific/linux/mbp-modules/mbp2018-bridge-drv/default.nix @@ -1,7 +1,7 @@ { lib, stdenv, kernel, fetchFromGitHub, }: stdenv.mkDerivation rec { - name = "mbp2018-bridge-drv"; + pname = "mbp2018-bridge-drv"; version = "b43fcc069da73e051072fde24af4014c9c487286"; src = fetchFromGitHub { From 05373b9b2db989a6729cae7ad7451cbeb34e72ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hl=C3=B6=C3=B0ver=20Sigur=C3=B0sson?= Date: Sun, 14 Feb 2021 09:18:10 +0100 Subject: [PATCH 3/7] Update pkgs/top-level/all-packages.nix Co-authored-by: Sandro --- pkgs/top-level/all-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 056939a29da7..8a38e7b78d08 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -19245,7 +19245,7 @@ in tbs = callPackage ../os-specific/linux/tbs { }; - mbp2018-bridge-drv = callPackage ../os-specific/linux/mbp-modules/mbp2018-bridge-drv { inherit kernel; }; + mbp2018-bridge-drv = callPackage ../os-specific/linux/mbp-modules/mbp2018-bridge-drv { }; nvidiabl = callPackage ../os-specific/linux/nvidiabl { }; From aed5bf4bfa2a0c33997b0abe483115dbe9a4cfde Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hl=C3=B6=C3=B0ver=20Sigur=C3=B0sson?= Date: Sun, 14 Feb 2021 09:22:13 +0100 Subject: [PATCH 4/7] adding myself as maintainer and adding -j cores makeflag --- .../linux/mbp-modules/mbp2018-bridge-drv/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/mbp-modules/mbp2018-bridge-drv/default.nix b/pkgs/os-specific/linux/mbp-modules/mbp2018-bridge-drv/default.nix index 204f21a5e9ee..3364d6bdbb74 100644 --- a/pkgs/os-specific/linux/mbp-modules/mbp2018-bridge-drv/default.nix +++ b/pkgs/os-specific/linux/mbp-modules/mbp2018-bridge-drv/default.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { buildPhase = '' make -C ${kernel.dev}/lib/modules/${kernel.modDirVersion}/build \ - M=$(pwd) modules + -j$NIX_BUILD_CORES M=$(pwd) modules ''; installPhase = '' @@ -29,6 +29,6 @@ stdenv.mkDerivation rec { homepage = "https://github.com/MCMrARM/mbp2018-bridge-drv"; license = lib.licenses.gpl2; platforms = platforms.linux; - maintainers = [ ]; + maintainers = [ lib.maintainers.hlolli ]; }; } From 352372a89dc7c134e294511418d28bb03dfb2224 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hl=C3=B6=C3=B0ver=20Sigur=C3=B0sson?= Date: Mon, 15 Feb 2021 15:23:14 +0100 Subject: [PATCH 5/7] Update pkgs/os-specific/linux/mbp-modules/mbp2018-bridge-drv/default.nix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Jörg Thalheim --- .../linux/mbp-modules/mbp2018-bridge-drv/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/os-specific/linux/mbp-modules/mbp2018-bridge-drv/default.nix b/pkgs/os-specific/linux/mbp-modules/mbp2018-bridge-drv/default.nix index 3364d6bdbb74..53db81266b17 100644 --- a/pkgs/os-specific/linux/mbp-modules/mbp2018-bridge-drv/default.nix +++ b/pkgs/os-specific/linux/mbp-modules/mbp2018-bridge-drv/default.nix @@ -2,7 +2,7 @@ stdenv.mkDerivation rec { pname = "mbp2018-bridge-drv"; - version = "b43fcc069da73e051072fde24af4014c9c487286"; + version = "0.01"; src = fetchFromGitHub { owner = "MCMrARM"; From 2e6c793ff9c8a6f6070923bd21936a9ec5940a95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hl=C3=B6=C3=B0ver=20Sigur=C3=B0sson?= Date: Mon, 15 Feb 2021 15:28:18 +0100 Subject: [PATCH 6/7] Update pkgs/os-specific/linux/mbp-modules/mbp2018-bridge-drv/default.nix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Jörg Thalheim --- .../linux/mbp-modules/mbp2018-bridge-drv/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/os-specific/linux/mbp-modules/mbp2018-bridge-drv/default.nix b/pkgs/os-specific/linux/mbp-modules/mbp2018-bridge-drv/default.nix index 53db81266b17..acf7f38e12db 100644 --- a/pkgs/os-specific/linux/mbp-modules/mbp2018-bridge-drv/default.nix +++ b/pkgs/os-specific/linux/mbp-modules/mbp2018-bridge-drv/default.nix @@ -7,7 +7,7 @@ stdenv.mkDerivation rec { src = fetchFromGitHub { owner = "MCMrARM"; repo = "mbp2018-bridge-drv"; - rev = "0.01"; + rev = "${version}"; sha256 = "0ac2l51ybfrvg8m36x67rsvgjqs1vwp7c89ssvbjkrcq3y4qdb53"; }; From 05af647258bfc861ab28a78b62950a421b6fba70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hl=C3=B6=C3=B0ver=20Sigur=C3=B0sson?= Date: Mon, 15 Feb 2021 15:30:26 +0100 Subject: [PATCH 7/7] fix license meta --- .../linux/mbp-modules/mbp2018-bridge-drv/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/os-specific/linux/mbp-modules/mbp2018-bridge-drv/default.nix b/pkgs/os-specific/linux/mbp-modules/mbp2018-bridge-drv/default.nix index acf7f38e12db..258f4296e2e0 100644 --- a/pkgs/os-specific/linux/mbp-modules/mbp2018-bridge-drv/default.nix +++ b/pkgs/os-specific/linux/mbp-modules/mbp2018-bridge-drv/default.nix @@ -27,7 +27,7 @@ stdenv.mkDerivation rec { A driver for MacBook models 2018 and newer, implementing the VHCI (required for mouse/keyboard/etc.) and audio functionality. ''; homepage = "https://github.com/MCMrARM/mbp2018-bridge-drv"; - license = lib.licenses.gpl2; + license = lib.licenses.gpl2Only; platforms = platforms.linux; maintainers = [ lib.maintainers.hlolli ]; };