diff --git a/pkgs/build-support/kernel/modules-closure.sh b/pkgs/build-support/kernel/modules-closure.sh index c1e216956e77..7faaa0122cd2 100644 --- a/pkgs/build-support/kernel/modules-closure.sh +++ b/pkgs/build-support/kernel/modules-closure.sh @@ -27,7 +27,7 @@ done echo "closure:" ensureDir $out/lib/modules/"$version" for module in $closure; do - target=$(echo $module | sed "s^/nix/store/.*/lib/modules/^$out/lib/modules/^") + target=$(echo $module | sed "s^$NIX_STORE.*/lib/modules/^$out/lib/modules/^") if test -e "$target"; then continue; fi mkdir -p $(dirname $target) echo $module