Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 45 lines 1.1 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 kernel, 6 kernelModuleMakeFlags, 7 nix-update-script, 8}: 9 10stdenv.mkDerivation rec { 11 pname = "qc71_laptop"; 12 version = "0-unstable-2025-01-07"; 13 14 src = fetchFromGitHub { 15 owner = "pobrn"; 16 repo = "qc71_laptop"; 17 rev = "ebab4af0b2c5b162bb9f27c80cd284c36b8fb7a9"; 18 hash = "sha256-sRvxcdocYKnwMH/qYkKj66uClI1bSmMSxXHrHsc7uco="; 19 }; 20 21 nativeBuildInputs = kernel.moduleBuildDependencies; 22 23 makeFlags = kernelModuleMakeFlags ++ [ 24 "VERSION=${version}" 25 "KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" 26 ]; 27 28 installPhase = '' 29 runHook preInstall 30 install -D qc71_laptop.ko -t $out/lib/modules/${kernel.modDirVersion}/extra 31 runHook postInstall 32 ''; 33 34 passthru.updateScript = nix-update-script { 35 extraArgs = [ "--version=branch" ]; 36 }; 37 38 meta = with lib; { 39 description = "Linux driver for QC71 laptop"; 40 homepage = "https://github.com/pobrn/qc71_laptop/"; 41 license = licenses.gpl2Only; 42 maintainers = with maintainers; [ aacebedo ]; 43 platforms = [ "x86_64-linux" ]; 44 }; 45}