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:
parent
1824f424b2
commit
d329b66b73
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue