tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
0
fork
atom
lol
0
fork
atom
overview
issues
pulls
pipelines
Add optional IPv6 support for nix-binary-cache
Michael Raskin
11 years ago
d64160ec
4e7eb5c5
+12
1 changed file
expand all
collapse all
unified
split
pkgs
servers
http
nix-binary-cache
nix-binary-cache-start.in
+12
pkgs/servers/http/nix-binary-cache/nix-binary-cache-start.in
reviewed
···
39
39
echo "PORT=$1"
40
40
shift;
41
41
;;
42
42
+
--ipv6)
43
43
+
shift;
44
44
+
echo "USE_IPV6=enable"
45
45
+
;;
42
46
--help)
43
47
cat <<EOF >&2
44
48
"$0": start the Nix binary cache serving the Nix store dynamically.
···
56
60
57
61
--nix-remote 'daemon' or empty string '' - whether to use daemon for store
58
62
operations
63
63
+
64
64
+
--ipv6 enable ipv6
59
65
60
66
--help show help and exit
61
67
EOF
···
81
87
cgi.assign = ( \".cgi\" => \"@shell@\" )
82
88
setenv.add-request-header = ( \"NIX_BINARY_CACHE_CONFIG\" => \"$workingdir/nix-binary-cache.conf\" )
83
89
" > lighttpd.conf
90
90
+
91
91
+
test -n "$USE_IPV6" && echo "
92
92
+
\$SERVER[\"socket\"] == \"[::]:$PORT\" {
93
93
+
server.use-ipv6 = \"enable\"
94
94
+
}
95
95
+
" >> lighttpd.conf
84
96
85
97
cp @out@/nix-binary-cache.cgi .
86
98
cp @out@/nix-binary-cache.cgi ./nix-bc.cgi