From 20ebca303e3372317c01c0c54f64f3d6423b094c Mon Sep 17 00:00:00 2001 From: Shea Levy Date: Sun, 24 Jul 2011 20:24:23 +0000 Subject: [PATCH] Add comments explaining the purpose of the postBuild prepend svn path=/nixpkgs/trunk/; revision=27922 --- pkgs/os-specific/linux/kernel/generic.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/os-specific/linux/kernel/generic.nix b/pkgs/os-specific/linux/kernel/generic.nix index 46ebb2b8fff4..b5d10f069211 100644 --- a/pkgs/os-specific/linux/kernel/generic.nix +++ b/pkgs/os-specific/linux/kernel/generic.nix @@ -77,6 +77,11 @@ stdenv.mkDerivation { inherit preConfigure src module_init_tools localVersion postInstall; + #Currently, the builder sets $MODULE_DIR during installPhase. This causes + #problems with at least linux 3.0, so we need to conditionally avoid + #setting $MODULE_DIR. This prepend to postBuild accomplishes this with a + #sed/eval trick thanks to MarcWeber + postBuild = (if setModuleDir then "" else '' eval "$(type installPhase | sed -e '1d' -e '/export MODULE_DIR/d')"; '') + postBuild;