bozohttpd: minor formatting

The Nix style guide isn't exactly comprehensive, but this at least seems
slightly closer to the examples:

https://nixos.org/manual/nixpkgs/stable/#sec-syntax

I'm annoyed that nixpkgs-fmt as of writing won't accept:

  COPTS = [
    # ...
  ] ++ optional (...) "..."
    ++ optional (...) "...";

...which seems to be the actual convention, looking at eg. pkgs.nginx.
This commit is contained in:
embr 2021-05-31 10:47:46 +02:00
parent f4f05481e3
commit ee4b583ae8

View file

@ -45,25 +45,24 @@ stdenv.mkDerivation rec {
buildInputs = [ openssl ] ++ optional (luaSupport) lua;
nativeBuildInputs = [ bmake groff ];
COPTS =
[
"-D_DEFAULT_SOURCE"
"-D_GNU_SOURCE"
COPTS = [
"-D_DEFAULT_SOURCE"
"-D_GNU_SOURCE"
# Ensure that we can serve >2GB files even on 32-bit systems.
"-D_LARGEFILE_SOURCE"
"-D_FILE_OFFSET_BITS=64"
# ensure that we can serve >2GB files even on 32-bit systems.
"-D_LARGEFILE_SOURCE"
"-D_FILE_OFFSET_BITS=64"
# unpackaged dependency: https://man.netbsd.org/blocklist.3
"-DNO_BLOCKLIST_SUPPORT"
]
++ optional (!userSupport) "-DNO_USER_SUPPORT"
++ optional (!dirIndexSupport) "-DNO_DIRINDEX_SUPPORT"
++ optional (!dynamicContentSupport) "-DNO_DYNAMIC_CONTENT"
++ optional (!luaSupport) "-DNO_LUA_SUPPORT"
++ optional (!sslSupport) "-DNO_SSL_SUPPORT"
++ optional (!cgiSupport) "-DNO_CGIBIN_SUPPORT"
++ optional (htpasswdSupport) "-DDO_HTPASSWD";
# unpackaged dependency: https://man.netbsd.org/blocklist.3
"-DNO_BLOCKLIST_SUPPORT"
]
++ optional (!userSupport) "-DNO_USER_SUPPORT"
++ optional (!dirIndexSupport) "-DNO_DIRINDEX_SUPPORT"
++ optional (!dynamicContentSupport) "-DNO_DYNAMIC_CONTENT"
++ optional (!luaSupport) "-DNO_LUA_SUPPORT"
++ optional (!sslSupport) "-DNO_SSL_SUPPORT"
++ optional (!cgiSupport) "-DNO_CGIBIN_SUPPORT"
++ optional (htpasswdSupport) "-DDO_HTPASSWD";
_LDADD = [ "-lcrypt" "-lm" ]
++ optional (luaSupport) "-llua"