From d329b66b7336cac791837f4baeb510c6848c6b57 Mon Sep 17 00:00:00 2001 From: Mathijs Kwik Date: Sun, 18 Mar 2012 23:13:41 +0000 Subject: [PATCH] bbswitch: use the modDirVersion instead of version svn path=/nixpkgs/trunk/; revision=33244 --- pkgs/os-specific/linux/bbswitch/default.nix | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pkgs/os-specific/linux/bbswitch/default.nix b/pkgs/os-specific/linux/bbswitch/default.nix index 7c5752b4e34e..8b4350fdb139 100644 --- a/pkgs/os-specific/linux/bbswitch/default.nix +++ b/pkgs/os-specific/linux/bbswitch/default.nix @@ -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