Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 55 lines 1.4 kB view raw
1{ 2 stdenv, 3 lib, 4 fetchFromGitHub, 5 kernel, 6}: 7 8stdenv.mkDerivation rec { 9 name = "facetimehd-${version}-${kernel.version}"; 10 version = "0.6.13"; 11 12 # Note: When updating this revision: 13 # 1. Also update pkgs/os-specific/linux/firmware/facetimehd-firmware/ 14 # 2. Test the module and firmware change via: 15 # a. Give some applications a try (Skype, Hangouts, Cheese, etc.) 16 # b. Run: journalctl -f 17 # c. Then close the lid 18 # d. Then open the lid (and maybe press a key to wake it up) 19 # e. see if the module loads back (apps using the camera won't 20 # recover and will have to be restarted) and the camera 21 # still works. 22 src = fetchFromGitHub { 23 owner = "patjak"; 24 repo = "facetimehd"; 25 rev = version; 26 sha256 = "sha256-3BDIQNMdNeZyuEgnAkJ0uy7b5lOOx1CfS3eamyZyZm8="; 27 }; 28 29 preConfigure = '' 30 export INSTALL_MOD_PATH="$out" 31 ''; 32 33 hardeningDisable = [ "pic" ]; 34 35 nativeBuildInputs = kernel.moduleBuildDependencies; 36 37 makeFlags = [ 38 "KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" 39 ]; 40 41 meta = with lib; { 42 homepage = "https://github.com/patjak/bcwc_pcie"; 43 description = "Linux driver for the Facetime HD (Broadcom 1570) PCIe webcam"; 44 license = licenses.gpl2Only; 45 maintainers = with maintainers; [ 46 womfoo 47 grahamc 48 kraem 49 ]; 50 platforms = [ 51 "i686-linux" 52 "x86_64-linux" 53 ]; 54 }; 55}