11 , userSupport ? !minimal
12 , cgiSupport ? !minimal
13 , dirIndexSupport ? !minimal
14 , dynamicContentSupport ? !minimal
15 , sslSupport ? !minimal
16 , luaSupport ? !minimal
18 , htpasswdSupport ? !minimal
21 let inherit (lib) optional optionals;
23 stdenv.mkDerivation rec {
27 # bozohttpd is developed in-tree in pkgsrc, canonical hashes can be found at:
28 # http://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/www/bozohttpd/distinfo
30 url = "http://eterna23.net/${pname}/${pname}-${version}.tar.bz2";
31 hash = "sha512-fr1PnyYAS3wkpmj/npRC3A87UL9LIXw4thlM4GfrtlJbuX5EkWGVJnHJW/EmYp7z+N91dcdRJgdO79l6WJsKpg==";
34 buildInputs = [ openssl libxcrypt ] ++ optional (luaSupport) lua;
35 nativeBuildInputs = [ bmake groff ];
41 # ensure that we can serve >2GB files even on 32-bit systems.
43 "-D_FILE_OFFSET_BITS=64"
45 # unpackaged dependency: https://man.netbsd.org/blocklist.3
46 "-DNO_BLOCKLIST_SUPPORT"
48 ++ optional (!userSupport) "-DNO_USER_SUPPORT"
49 ++ optional (!dirIndexSupport) "-DNO_DIRINDEX_SUPPORT"
50 ++ optional (!dynamicContentSupport) "-DNO_DYNAMIC_CONTENT"
51 ++ optional (!luaSupport) "-DNO_LUA_SUPPORT"
52 ++ optional (!sslSupport) "-DNO_SSL_SUPPORT"
53 ++ optional (!cgiSupport) "-DNO_CGIBIN_SUPPORT"
54 ++ optional (htpasswdSupport) "-DDO_HTPASSWD";
57 ++ optional (stdenv.hostPlatform.libc != "libSystem") "-lcrypt"
58 ++ optional (luaSupport) "-llua"
59 ++ optionals (sslSupport) [ "-lssl" "-lcrypto" ];
60 makeFlags = [ "LDADD=$(_LDADD)" ];
63 nativeCheckInputs = [ inetutils wget ];
64 checkFlags = optional (!cgiSupport) "CGITESTS=";
67 description = "Bozotic HTTP server; small and secure";
69 bozohttpd is a small and secure HTTP version 1.1 server. Its main
70 feature is the lack of features, reducing the code size and improving
73 It supports CGI/1.1, HTTP/1.1, HTTP/1.0, HTTP/0.9, ~user translations,
74 virtual hosting support, as well as multiple IP-based servers on a
75 single machine. It is capable of servicing pages via the IPv6 protocol.
76 It has SSL support. It has no configuration file by design.
78 homepage = "http://www.eterna.com.au/bozohttpd/";
79 changelog = "http://www.eterna.com.au/bozohttpd/CHANGES";
80 license = licenses.bsd2;
81 maintainers = [ maintainers.embr ];
82 platforms = platforms.all;