@@ -39,6 +39,10 @@ parse_opts () {
39 echo "PORT=$1"
39 echo "PORT=$1"
44+ echo "USE_IPV6=enable"
43 cat <<EOF >&2
47 cat <<EOF >&2
44"$0": start the Nix binary cache serving the Nix store dynamically.
48"$0": start the Nix binary cache serving the Nix store dynamically.
@@ -57,6 +61,8 @@ Recognized options:
57--nix-remote 'daemon' or empty string '' - whether to use daemon for store
61--nix-remote 'daemon' or empty string '' - whether to use daemon for store
58 operations
62 operations
60--help show help and exit
66--help show help and exit
@@ -82,6 +88,12 @@ cgi.assign = ( \".cgi\" => \"@shell@\" )
82setenv.add-request-header = ( \"NIX_BINARY_CACHE_CONFIG\" => \"$workingdir/nix-binary-cache.conf\" )
88setenv.add-request-header = ( \"NIX_BINARY_CACHE_CONFIG\" => \"$workingdir/nix-binary-cache.conf\" )
83" > lighttpd.conf
89" > lighttpd.conf
91+test -n "$USE_IPV6" && echo "
92+\$SERVER[\"socket\"] == \"[::]:$PORT\" {
93+server.use-ipv6 = \"enable\"
85cp @out@/nix-binary-cache.cgi .
97cp @out@/nix-binary-cache.cgi .
86cp @out@/nix-binary-cache.cgi ./nix-bc.cgi
98cp @out@/nix-binary-cache.cgi ./nix-bc.cgi