diff options
author | Arie Middelkoop <amiddelk@gmail.com> | 2012-02-24 00:17:09 +0000 |
---|---|---|
committer | Arie Middelkoop <amiddelk@gmail.com> | 2012-02-24 00:17:09 +0000 |
commit | ed813f3955595ffd594570f74f406f3b6319610a (patch) | |
tree | 2f7dcd966845189319b53c2f84ef442c26d6710f /pkgs/os-specific/linux/bbswitch | |
parent | 70d56e06383cfa6eb547ce7f1882bfcd95b1e813 (diff) | |
download | nixpkgs-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.nix | 7 |
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 |