about summary refs log tree commit diff
path: root/pkgs/os-specific/bsd/netbsd/setup-hook.sh
diff options
context:
space:
mode:
authorJohn Ericson <git@JohnEricson.me>2020-03-09 02:10:06 -0400
committerJohn Ericson <John.Ericson@Obsidian.Systems>2021-07-11 21:11:10 +0000
commit2810201833ae619818179f11a225b2d584d25ec9 (patch)
tree0ea2a15e24ea6d4fa87f32992414f5e6870405e9 /pkgs/os-specific/bsd/netbsd/setup-hook.sh
parent75db7f8eb049e825ca2a5e201180aa45dd82709a (diff)
netbsd: Split out path merging from bsd setup hook
I plan on doing the sources for FreeBSD differently. Indeed we might
want to change this for NetBSD too eventually.

In any event, the way we manage sources is not intrinsically the same
across BSDs so it makes sense to pull this out.
Diffstat (limited to 'pkgs/os-specific/bsd/netbsd/setup-hook.sh')
-rw-r--r--pkgs/os-specific/bsd/netbsd/setup-hook.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/pkgs/os-specific/bsd/netbsd/setup-hook.sh b/pkgs/os-specific/bsd/netbsd/setup-hook.sh
new file mode 100644
index 0000000000000..17a8d6fca84ac
--- /dev/null
+++ b/pkgs/os-specific/bsd/netbsd/setup-hook.sh
@@ -0,0 +1,10 @@
+mergeNetBSDSourceDir() {
+  # merge together all extra paths
+  # there should be a better way to do this
+  chmod -R u+w $BSDSRCDIR
+  for path in $extraPaths; do
+    rsync -Er --chmod u+w $path/ $BSDSRCDIR/
+  done
+}
+
+postUnpackHooks+=(mergeNetBSDSourceDir)