mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-09-22 04:57:56 +03:00
Add optional IPv6 support for nix-binary-cache
This commit is contained in:
parent
4e7eb5c538
commit
d64160ec99
@ -39,6 +39,10 @@ parse_opts () {
|
|||||||
echo "PORT=$1"
|
echo "PORT=$1"
|
||||||
shift;
|
shift;
|
||||||
;;
|
;;
|
||||||
|
--ipv6)
|
||||||
|
shift;
|
||||||
|
echo "USE_IPV6=enable"
|
||||||
|
;;
|
||||||
--help)
|
--help)
|
||||||
cat <<EOF >&2
|
cat <<EOF >&2
|
||||||
"$0": start the Nix binary cache serving the Nix store dynamically.
|
"$0": start the Nix binary cache serving the Nix store dynamically.
|
||||||
@ -57,6 +61,8 @@ Recognized options:
|
|||||||
--nix-remote 'daemon' or empty string '' - whether to use daemon for store
|
--nix-remote 'daemon' or empty string '' - whether to use daemon for store
|
||||||
operations
|
operations
|
||||||
|
|
||||||
|
--ipv6 enable ipv6
|
||||||
|
|
||||||
--help show help and exit
|
--help show help and exit
|
||||||
EOF
|
EOF
|
||||||
exit 1;
|
exit 1;
|
||||||
@ -82,6 +88,12 @@ cgi.assign = ( \".cgi\" => \"@shell@\" )
|
|||||||
setenv.add-request-header = ( \"NIX_BINARY_CACHE_CONFIG\" => \"$workingdir/nix-binary-cache.conf\" )
|
setenv.add-request-header = ( \"NIX_BINARY_CACHE_CONFIG\" => \"$workingdir/nix-binary-cache.conf\" )
|
||||||
" > lighttpd.conf
|
" > lighttpd.conf
|
||||||
|
|
||||||
|
test -n "$USE_IPV6" && echo "
|
||||||
|
\$SERVER[\"socket\"] == \"[::]:$PORT\" {
|
||||||
|
server.use-ipv6 = \"enable\"
|
||||||
|
}
|
||||||
|
" >> lighttpd.conf
|
||||||
|
|
||||||
cp @out@/nix-binary-cache.cgi .
|
cp @out@/nix-binary-cache.cgi .
|
||||||
cp @out@/nix-binary-cache.cgi ./nix-bc.cgi
|
cp @out@/nix-binary-cache.cgi ./nix-bc.cgi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user