diff --git a/pkgs/os-specific/linux/qc71_laptop/default.nix b/pkgs/os-specific/linux/qc71_laptop/default.nix new file mode 100644 index 000000000000..92818ccfb096 --- /dev/null +++ b/pkgs/os-specific/linux/qc71_laptop/default.nix @@ -0,0 +1,34 @@ +{ lib, stdenv, fetchFromGitHub, kernel }: + +stdenv.mkDerivation rec { + pname = "qc71_laptop"; + version = "unstable-2022-06-01"; + + src = fetchFromGitHub { + owner = "pobrn"; + repo = "qc71_laptop"; + rev = "28106e0602807d78d1f5fa220ab6148dd6477c1c"; + hash = "sha256-3bhw2HbEVuxPfGMt/eE2nCuMLHzYHRY3nRWPzZxKHro="; + }; + + nativeBuildInputs = kernel.moduleBuildDependencies; + + makeFlags = kernel.makeFlags ++ [ + "VERSION=${version}" + "KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" + ]; + + installPhase = '' + runHook preInstall + install -D qc71_laptop.ko -t $out/lib/modules/${kernel.modDirVersion}/extra + runHook postInstall + ''; + + meta = with lib; { + description = "Linux driver for QC71 laptop"; + homepage = "https://github.com/pobrn/qc71_laptop/"; + license = licenses.gpl2Plus; + maintainers = with maintainers; [ aacebedo ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/top-level/linux-kernels.nix b/pkgs/top-level/linux-kernels.nix index fc8ebc60823f..fe258c7f49ac 100644 --- a/pkgs/top-level/linux-kernels.nix +++ b/pkgs/top-level/linux-kernels.nix @@ -497,6 +497,8 @@ in { can-isotp = callPackage ../os-specific/linux/can-isotp { }; + qc71_laptop = callPackage ../os-specific/linux/qc71_laptop { }; + } // lib.optionalAttrs config.allowAliases { ati_drivers_x11 = throw "ati drivers are no longer supported by any kernel >=4.1"; # added 2021-05-18; });