From ed813f3955595ffd594570f74f406f3b6319610a Mon Sep 17 00:00:00 2001 From: Arie Middelkoop Date: Fri, 24 Feb 2012 00:17:09 +0000 Subject: 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 --- pkgs/os-specific/linux/bbswitch/default.nix | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'pkgs/os-specific/linux/bbswitch') diff --git a/pkgs/os-specific/linux/bbswitch/default.nix b/pkgs/os-specific/linux/bbswitch/default.nix index a8f8a9d33ef3..7c5752b4e34e 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 -- cgit 1.4.1