summary refs log tree commit diff
path: root/pkgs/os-specific/linux/facetimehd
diff options
context:
space:
mode:
authorGraham Christensen <graham@grahamc.com>2016-10-15 07:41:53 -0400
committerGraham Christensen <graham@grahamc.com>2016-10-15 07:42:08 -0400
commit2525a3d682d469f9f55fe4be8f6eaa228484ba4f (patch)
treea04138e328c0e49c1e04d85752e9dbd6ca73ed76 /pkgs/os-specific/linux/facetimehd
parent5e1c84e475ea4f5763885b2eb5be821441a6837e (diff)
downloadnixpkgs-2525a3d682d469f9f55fe4be8f6eaa228484ba4f.tar
nixpkgs-2525a3d682d469f9f55fe4be8f6eaa228484ba4f.tar.gz
nixpkgs-2525a3d682d469f9f55fe4be8f6eaa228484ba4f.tar.bz2
nixpkgs-2525a3d682d469f9f55fe4be8f6eaa228484ba4f.tar.lz
nixpkgs-2525a3d682d469f9f55fe4be8f6eaa228484ba4f.tar.xz
nixpkgs-2525a3d682d469f9f55fe4be8f6eaa228484ba4f.tar.zst
nixpkgs-2525a3d682d469f9f55fe4be8f6eaa228484ba4f.zip
facetimehd: 2016-05-02 -> 2016-10-09
Diffstat (limited to 'pkgs/os-specific/linux/facetimehd')
-rw-r--r--pkgs/os-specific/linux/facetimehd/default.nix41
1 files changed, 28 insertions, 13 deletions
diff --git a/pkgs/os-specific/linux/facetimehd/default.nix b/pkgs/os-specific/linux/facetimehd/default.nix
index de726d5b42c..a9cea506c97 100644
--- a/pkgs/os-specific/linux/facetimehd/default.nix
+++ b/pkgs/os-specific/linux/facetimehd/default.nix
@@ -3,25 +3,40 @@
 # facetimehd is not supported for kernels older than 3.19";
 assert stdenv.lib.versionAtLeast kernel.version "3.19";
 
+let
+  # Note: When updating this revision:
+  # 1. Also update pkgs/os-specific/linux/firmware/facetimehd-firmware/
+  # 2. Test the module and firmware change via:
+  #    a. Give some applications a try (Skype, Hangouts, Cheese, etc.)
+  #    b. Run: journalctl -f
+  #    c. Then close the lid
+  #    d. Then open the lid (and maybe press a key to wake it up)
+  #    e. see if the module loads back (apps using the camera won't
+  #       recover and will have to be restarted) and the camera
+  #       still works.
+  srcParams = if (stdenv.lib.versionAtLeast kernel.version "4.8") then
+    { # Use mainline branch
+      version = "unstable-2016-10-09";
+      rev = "887d0f531ef7b91457be519474136c3355c5132b";
+      sha256 = "0bayahnxar1q6wvf9cb6p8gsfw98w0wqp715hs4r7apmddwk9v7n";
+    }
+  else
+    { # Use master branch (broken on 4.8)
+      version = "unstable-2016-05-02";
+      rev = "5a7083bd98b38ef3bd223f7ee531d58f4fb0fe7c";
+      sha256 = "0d455kajvn5xav9iilqy7s1qvsy4yb8vzjjxx7bvcgp7aj9ljvdp";
+    }
+  ;
+in
+
 stdenv.mkDerivation rec {
   name = "facetimehd-${version}-${kernel.version}";
-  version = "git-20160503";
+  version = srcParams.version;
 
   src = fetchFromGitHub {
     owner = "patjak";
     repo = "bcwc_pcie";
-    # Note: When updating this revision:
-    # 1. Also update pkgs/os-specific/linux/firmware/facetimehd-firmware/
-    # 2. Test the module and firmware change via:
-    #    a. Give some applications a try (Skype, Hangouts, Cheese, etc.)
-    #    b. Run: journalctl -f
-    #    c. Then close the lid
-    #    d. Then open the lid (and maybe press a key to wake it up)
-    #    e. see if the module loads back (apps using the camera won't
-    #       recover and will have to be restarted) and the camera
-    #       still works.
-    rev = "5a7083bd98b38ef3bd223f7ee531d58f4fb0fe7c";
-    sha256 = "0d455kajvn5xav9iilqy7s1qvsy4yb8vzjjxx7bvcgp7aj9ljvdp";
+    inherit (srcParams) rev sha256;
   };
 
   preConfigure = ''