about summary refs log tree commit diff
path: root/pkgs/os-specific/bsd/freebsd/lib
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/os-specific/bsd/freebsd/lib')
-rw-r--r--pkgs/os-specific/bsd/freebsd/lib/default.nix20
-rw-r--r--pkgs/os-specific/bsd/freebsd/lib/install-wrapper.sh30
2 files changed, 11 insertions, 39 deletions
diff --git a/pkgs/os-specific/bsd/freebsd/lib/default.nix b/pkgs/os-specific/bsd/freebsd/lib/default.nix
index 30fea7e17dce6..d022f7cfa14c6 100644
--- a/pkgs/os-specific/bsd/freebsd/lib/default.nix
+++ b/pkgs/os-specific/bsd/freebsd/lib/default.nix
@@ -3,14 +3,16 @@
 {
   inherit version;
 
-  mkBsdArch = stdenv':  {
-    x86_64 = "amd64";
-    aarch64 = "arm64";
-    i486 = "i386";
-    i586 = "i386";
-    i686 = "i386";
-  }.${stdenv'.hostPlatform.parsed.cpu.name}
-    or stdenv'.hostPlatform.parsed.cpu.name;
+  mkBsdArch =
+    stdenv':
+    {
+      x86_64 = "amd64";
+      aarch64 = "arm64";
+      i486 = "i386";
+      i586 = "i386";
+      i686 = "i386";
+    }
+    .${stdenv'.hostPlatform.parsed.cpu.name} or stdenv'.hostPlatform.parsed.cpu.name;
 
-  install-wrapper = builtins.readFile ./install-wrapper.sh;
+  install-wrapper = builtins.readFile ../../lib/install-wrapper.sh;
 }
diff --git a/pkgs/os-specific/bsd/freebsd/lib/install-wrapper.sh b/pkgs/os-specific/bsd/freebsd/lib/install-wrapper.sh
deleted file mode 100644
index 91a7a2679f209..0000000000000
--- a/pkgs/os-specific/bsd/freebsd/lib/install-wrapper.sh
+++ /dev/null
@@ -1,30 +0,0 @@
-set -eu
-
-args=()
-declare -i path_args=0
-
-while (( $# )); do
-  if (( $# == 1 )); then
-    if (( path_args > 1)) || [[ "$1" = */ ]]; then
-      mkdir -p "$1"
-    else
-      mkdir -p "$(dirname "$1")"
-    fi
-  fi
-  case $1 in
-    -C) ;;
-    -o | -g) shift ;;
-    -s) ;;
-    -m | -l)
-      # handle next arg so not counted as path arg
-      args+=("$1" "$2")
-      shift
-      ;;
-    -*) args+=("$1") ;;
-    *)
-      path_args+=1
-      args+=("$1")
-      ;;
-  esac
-  shift
-done