python312Packages.vdf: avoid using pname for src.repo
[NixPkgs.git] / pkgs / os-specific / linux / framework-laptop-kmod / default.nix
blobd0ca1a3bb1d9c935930817340114575a8483df21
1 { lib
2 , stdenv
3 , kernel
4 , fetchFromGitHub
5 , unstableGitUpdater
6 }:
8 stdenv.mkDerivation {
9   pname = "framework-laptop-kmod";
10   version = "0-unstable-2024-09-15";
12   src = fetchFromGitHub {
13     owner = "DHowett";
14     repo = "framework-laptop-kmod";
15     rev = "6164bc3dec24b6bb2806eedd269df6a170bcc930";
16     hash = "sha256-OwtXQR0H4GNlYjVZ5UU5MEM6ZOjlV3B0x2auYawbS2U=";
17   };
19   nativeBuildInputs = kernel.moduleBuildDependencies;
21   makeFlags = kernel.makeFlags ++ [
22     "KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
23   ];
25   installPhase = ''
26     runHook preInstall
27     install -D framework_laptop.ko -t $out/lib/modules/${kernel.modDirVersion}/extra
28     runHook postInstall
29   '';
32   passthru.updateScript = unstableGitUpdater { };
34   meta = with lib; {
35     description = "Kernel module that exposes the Framework Laptop (13, 16)'s battery charge limit and LEDs to userspace";
36     homepage = "https://github.com/DHowett/framework-laptop-kmod";
37     license = licenses.gpl2Only;
38     maintainers = with maintainers; [ gaykitty ];
39     platforms = platforms.linux;
40     broken = lib.versionOlder kernel.version "6.1";
41   };