14 userSupport ? !minimal,
15 cgiSupport ? !minimal,
16 dirIndexSupport ? !minimal,
17 dynamicContentSupport ? !minimal,
18 sslSupport ? !minimal,
19 luaSupport ? !minimal,
20 htpasswdSupport ? !minimal,
23 stdenv.mkDerivation (finalAttrs: {
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/bozohttpd/bozohttpd-${finalAttrs.version}.tar.bz2";
31 hash = "sha512-fr1PnyYAS3wkpmj/npRC3A87UL9LIXw4thlM4GfrtlJbuX5EkWGVJnHJW/EmYp7z+N91dcdRJgdO79l6WJsKpg==";
37 ] ++ lib.optionals (luaSupport) [ lua ];
50 COPTS = lib.concatStringsSep " " (
55 # ensure that we can serve >2GB files even on 32-bit systems.
57 "-D_FILE_OFFSET_BITS=64"
59 # unpackaged dependency: https://man.netbsd.org/blocklist.3
60 "-DNO_BLOCKLIST_SUPPORT"
62 ++ lib.optionals (htpasswdSupport) [ "-DDO_HTPASSWD" ]
63 ++ lib.optionals (!cgiSupport) [ "-DNO_CGIBIN_SUPPORT" ]
64 ++ lib.optionals (!dirIndexSupport) [ "-DNO_DIRINDEX_SUPPORT" ]
65 ++ lib.optionals (!dynamicContentSupport) [ "-DNO_DYNAMIC_CONTENT" ]
66 ++ lib.optionals (!luaSupport) [ "-DNO_LUA_SUPPORT" ]
67 ++ lib.optionals (!sslSupport) [ "-DNO_SSL_SUPPORT" ]
68 ++ lib.optionals (!userSupport) [ "-DNO_USER_SUPPORT" ]
71 _LDADD = lib.concatStringsSep " " (
73 ++ lib.optionals (stdenv.hostPlatform.libc != "libSystem") [ "-lcrypt" ]
74 ++ lib.optionals (luaSupport) [ "-llua" ]
75 ++ lib.optionals (sslSupport) [
82 makeFlags = [ "LDADD=$(_LDADD)" ];
84 checkFlags = lib.optionals (!cgiSupport) [ "CGITESTS=" ];
89 homepage = "http://www.eterna23.net/bozohttpd/";
90 description = "Bozotic HTTP server; small and secure";
92 bozohttpd is a small and secure HTTP version 1.1 server. Its main
93 feature is the lack of features, reducing the code size and improving
96 It supports CGI/1.1, HTTP/1.1, HTTP/1.0, HTTP/0.9, ~user translations,
97 virtual hosting support, as well as multiple IP-based servers on a
98 single machine. It is capable of servicing pages via the IPv6 protocol.
99 It has SSL support. It has no configuration file by design.
101 changelog = "http://www.eterna23.net/bozohttpd/CHANGES";
102 license = lib.licenses.bsd2;
103 mainProgram = "bozohttpd";
104 maintainers = [ lib.maintainers.embr ];
105 platforms = lib.platforms.all;