From 529b5394941305e39b3b3bb116d4928e3421ac4a Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Sun, 18 Apr 2021 10:50:14 +0000 Subject: [PATCH] netbsd.mkDerivation: popd in moveUsrDir Permanently changing the directory here was breaking the kernel build, which needs to do other things after moveUsrDir. --- pkgs/os-specific/bsd/netbsd/builder.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/os-specific/bsd/netbsd/builder.sh b/pkgs/os-specific/bsd/netbsd/builder.sh index 925001567f7..332e5c2098f 100644 --- a/pkgs/os-specific/bsd/netbsd/builder.sh +++ b/pkgs/os-specific/bsd/netbsd/builder.sh @@ -105,9 +105,10 @@ moveUsrDir() { if [ -d $prefix ]; then # Remove lingering /usr references if [ -d $prefix/usr ]; then - cd $prefix/usr + pushd $prefix/usr find . -type d -exec mkdir -p $out/\{} \; find . \( -type f -o -type l \) -exec mv \{} $out/\{} \; + popd fi find $prefix -type d -empty -delete