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