FreeBSD: improve bootstrapping, re-enable bdb for heimdal

janus 3c8f0a92 cbcab552

+23 -12
+3 -3
pkgs/stdenv/freebsd/default.nix
··· 11 inherit system; 12 13 name = "trivial-bootstrap-tools"; 14 - builder = "/bin/sh"; 15 args = [ ./trivial-bootstrap.sh ]; 16 17 mkdir = "/bin/mkdir"; ··· 23 name = "stdenv-freebsd-boot-1"; 24 inherit system config; 25 26 - initialPath = null; 27 - shell = "foo"; 28 fetchurlBoot = null; 29 cc = null; 30 };
··· 11 inherit system; 12 13 name = "trivial-bootstrap-tools"; 14 + builder = "/usr/local/bin/bash"; 15 args = [ ./trivial-bootstrap.sh ]; 16 17 mkdir = "/bin/mkdir"; ··· 23 name = "stdenv-freebsd-boot-1"; 24 inherit system config; 25 26 + initialPath = [ "/" "/usr" ]; 27 + shell = "${bootstrapTools}/bin/bash"; 28 fetchurlBoot = null; 29 cc = null; 30 };
+20 -9
pkgs/stdenv/freebsd/trivial-bootstrap.sh
··· 1 echo Building the trivial bootstrap environment... 2 echo 3 echo Needed FreeBSD packages: ··· 6 $mkdir -p $out/bin 7 8 ln () { 9 - if test "x$2" != x -a -f "$out/bin/$2"; then 10 - echo "$2 exists" 11 - exit 1; 12 - fi; 13 if test ! -f "$1"; then 14 echo Target "$2" does not exist 15 - exit 1; 16 fi 17 - $ln -s "$1" "$out/bin/$2" 18 } 19 20 ln /usr/local/bin/bash ··· 76 ln /usr/local/bin/gcpio cpio 77 ln /usr/local/bin/curl curl 78 ln /usr/local/bin/gfind find 79 - ln /usr/local/bin/grep grep #other grep is in /usr/bin 80 ln /usr/bin/gzip 81 ln /usr/bin/gunzip 82 ln /usr/bin/zcat 83 ln /usr/local/bin/ghead head 84 - ln /usr/bin/tail tail 85 ln /usr/local/bin/guniq uniq 86 ln /usr/bin/less less 87 ln /usr/local/bin/gtrue true 88 - # ln /usr/bin/diff diff 89 ln /usr/local/bin/egrep egrep 90 ln /usr/local/bin/fgrep fgrep 91 ln /usr/local/bin/gpatch patch
··· 1 + set -e 2 + set -o nounset 3 + set -o pipefail 4 + 5 echo Building the trivial bootstrap environment... 6 echo 7 echo Needed FreeBSD packages: ··· 10 $mkdir -p $out/bin 11 12 ln () { 13 + if [ ! -z "${2:-}" ]; then 14 + if [ -f "$out/bin/$2" ]; then 15 + echo "$2 exists" 16 + exit 1 17 + fi 18 + fi 19 if test ! -f "$1"; then 20 echo Target "$2" does not exist 21 + exit 1 22 + fi 23 + # TODO: check that destination directory exists 24 + if [ ! -z "${2:-}" ]; then 25 + $ln -s "$1" "$out/bin/$2" 26 + else 27 + $ln -s "$1" "$out/bin/" 28 fi 29 } 30 31 ln /usr/local/bin/bash ··· 87 ln /usr/local/bin/gcpio cpio 88 ln /usr/local/bin/curl curl 89 ln /usr/local/bin/gfind find 90 + ln /usr/local/bin/grep grep # other grep is in /usr/bin 91 ln /usr/bin/gzip 92 ln /usr/bin/gunzip 93 ln /usr/bin/zcat 94 ln /usr/local/bin/ghead head 95 + ln /usr/bin/tail tail # note that we are not using gtail!!! 96 ln /usr/local/bin/guniq uniq 97 ln /usr/bin/less less 98 ln /usr/local/bin/gtrue true 99 + # ln /usr/bin/diff diff # we are using gdiff (see above) 100 ln /usr/local/bin/egrep egrep 101 ln /usr/local/bin/fgrep fgrep 102 ln /usr/local/bin/gpatch patch