1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-26 07:31:20 +00:00

bbswitch: use the modDirVersion instead of version

svn path=/nixpkgs/trunk/; revision=33244
This commit is contained in:
Mathijs Kwik 2012-03-18 23:13:41 +00:00
parent 1824f424b2
commit d329b66b73

View file

@ -15,15 +15,14 @@ stdenv.mkDerivation {
};
preBuild = ''
kernelVersion=$(cd ${kernel}/lib/modules && ls)
substituteInPlace Makefile \
--replace "\$(shell uname -r)" "${kernel.version}" \
--replace "\$(shell uname -r)" "${kernel.modDirVersion}" \
--replace "/lib/modules" "${kernel}/lib/modules"
'';
installPhase = ''
ensureDir $out/lib/modules/${kernel.version}/misc
cp bbswitch.ko $out/lib/modules/${kernel.version}/misc
ensureDir $out/lib/modules/${kernel.modDirVersion}/misc
cp bbswitch.ko $out/lib/modules/${kernel.modDirVersion}/misc
ensureDir $out/bin
tee $out/bin/discrete_vga_poweroff << EOF