summary refs log tree commit diff
path: root/pkgs/os-specific/linux/bbswitch
diff options
context:
space:
mode:
authorArie Middelkoop <amiddelk@gmail.com>2012-02-24 00:17:09 +0000
committerArie Middelkoop <amiddelk@gmail.com>2012-02-24 00:17:09 +0000
commited813f3955595ffd594570f74f406f3b6319610a (patch)
tree2f7dcd966845189319b53c2f84ef442c26d6710f /pkgs/os-specific/linux/bbswitch
parent70d56e06383cfa6eb547ce7f1882bfcd95b1e813 (diff)
downloadnixpkgs-ed813f3955595ffd594570f74f406f3b6319610a.tar
nixpkgs-ed813f3955595ffd594570f74f406f3b6319610a.tar.gz
nixpkgs-ed813f3955595ffd594570f74f406f3b6319610a.tar.bz2
nixpkgs-ed813f3955595ffd594570f74f406f3b6319610a.tar.lz
nixpkgs-ed813f3955595ffd594570f74f406f3b6319610a.tar.xz
nixpkgs-ed813f3955595ffd594570f74f406f3b6319610a.tar.zst
nixpkgs-ed813f3955595ffd594570f74f406f3b6319610a.zip
Let 'bbswitch' and 'acpi-call' use the attribute kernel.version instead of a nasty 'ls' to determine the kernel version.
svn path=/nixpkgs/trunk/; revision=32531
Diffstat (limited to 'pkgs/os-specific/linux/bbswitch')
-rw-r--r--pkgs/os-specific/linux/bbswitch/default.nix7
1 files changed, 3 insertions, 4 deletions
diff --git a/pkgs/os-specific/linux/bbswitch/default.nix b/pkgs/os-specific/linux/bbswitch/default.nix
index a8f8a9d33ef..7c5752b4e34 100644
--- a/pkgs/os-specific/linux/bbswitch/default.nix
+++ b/pkgs/os-specific/linux/bbswitch/default.nix
@@ -17,14 +17,13 @@ stdenv.mkDerivation {
   preBuild = ''
     kernelVersion=$(cd ${kernel}/lib/modules && ls)
     substituteInPlace Makefile \
-      --replace "\$(shell uname -r)" "$kernelVersion" \
+      --replace "\$(shell uname -r)" "${kernel.version}" \
       --replace "/lib/modules" "${kernel}/lib/modules"
   '';
  
   installPhase = ''
-    kernelVersion=$(cd ${kernel}/lib/modules && ls)
-    ensureDir $out/lib/modules/$kernelVersion/misc
-    cp bbswitch.ko $out/lib/modules/$kernelVersion/misc
+    ensureDir $out/lib/modules/${kernel.version}/misc
+    cp bbswitch.ko $out/lib/modules/${kernel.version}/misc
 
     ensureDir $out/bin
     tee $out/bin/discrete_vga_poweroff << EOF