From 31d8a9a1f4043205978e5b2587b53aba841850d5 Mon Sep 17 00:00:00 2001 From: aszlig Date: Fri, 17 Aug 2012 14:45:14 +0200 Subject: [PATCH] virtualbox: Fix wrong path when recursing modules. The for loop didn't find $curdir, because it was set _after_ the directory has been changed. The variable is now called $srcroot and is set before the installPhase is changing directories. --- pkgs/applications/virtualization/virtualbox/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/virtualization/virtualbox/default.nix b/pkgs/applications/virtualization/virtualbox/default.nix index 6fc9dcf4bc22..f0b9e7d078e6 100644 --- a/pkgs/applications/virtualization/virtualbox/default.nix +++ b/pkgs/applications/virtualization/virtualbox/default.nix @@ -69,6 +69,7 @@ stdenv.mkDerivation { ''; installPhase = '' + srcroot="$(pwd)" libexec=$out/libexec/virtualbox # Install VirtualBox files @@ -77,9 +78,8 @@ stdenv.mkDerivation { cp -av * $libexec # Install kernel modules - curdir="$(pwd)" - for makefile in $curdir/out/linux.*/release/bin/src/*/Makefile \ - $curdir/out/linux.*/release/bin/additions/src/*/Makefile + for makefile in $srcroot/out/linux.*/release/bin/src/*/Makefile \ + $srcroot/out/linux.*/release/bin/additions/src/*/Makefile do mod="$(dirname "$makefile")" name="$(basename "$mod")"