Commit 7be9afd7 authored by Anderson Torres's avatar Anderson Torres
Browse files

bozohttpd: nixfmt-rfc-style

parent 153d36c7
Loading
Loading
Loading
Loading
+56 −40
Original line number Diff line number Diff line
{ lib
, stdenv
, fetchurl
, bmake
, groff
, inetutils
, wget
, openssl
, libxcrypt
, minimal ? false
, userSupport ? !minimal
, cgiSupport ? !minimal
, dirIndexSupport ? !minimal
, dynamicContentSupport ? !minimal
, sslSupport ? !minimal
, luaSupport ? !minimal
, lua
, htpasswdSupport ? !minimal
{
  lib,
  stdenv,
  fetchurl,
  bmake,
  groff,
  inetutils,
  wget,
  openssl,
  libxcrypt,
  minimal ? false,
  userSupport ? !minimal,
  cgiSupport ? !minimal,
  dirIndexSupport ? !minimal,
  dynamicContentSupport ? !minimal,
  sslSupport ? !minimal,
  luaSupport ? !minimal,
  lua,
  htpasswdSupport ? !minimal,
}:

let inherit (lib) optional optionals;
let
  inherit (lib) optional optionals;
in
stdenv.mkDerivation rec {
  pname = "bozohttpd";
@@ -31,10 +33,17 @@ stdenv.mkDerivation rec {
    hash = "sha512-fr1PnyYAS3wkpmj/npRC3A87UL9LIXw4thlM4GfrtlJbuX5EkWGVJnHJW/EmYp7z+N91dcdRJgdO79l6WJsKpg==";
  };

  buildInputs = [ openssl libxcrypt ] ++ optional (luaSupport) lua;
  nativeBuildInputs = [ bmake groff ];
  buildInputs = [
    openssl
    libxcrypt
  ] ++ optional (luaSupport) lua;
  nativeBuildInputs = [
    bmake
    groff
  ];

  COPTS = [
  COPTS =
    [
      "-D_DEFAULT_SOURCE"
      "-D_GNU_SOURCE"

@@ -53,14 +62,21 @@ stdenv.mkDerivation rec {
    ++ optional (!cgiSupport) "-DNO_CGIBIN_SUPPORT"
    ++ optional (htpasswdSupport) "-DDO_HTPASSWD";

  _LDADD = [ "-lm" ]
  _LDADD =
    [ "-lm" ]
    ++ optional (stdenv.hostPlatform.libc != "libSystem") "-lcrypt"
    ++ optional (luaSupport) "-llua"
    ++ optionals (sslSupport) [ "-lssl" "-lcrypto" ];
    ++ optionals (sslSupport) [
      "-lssl"
      "-lcrypto"
    ];
  makeFlags = [ "LDADD=$(_LDADD)" ];

  doCheck = true;
  nativeCheckInputs = [ inetutils wget ];
  nativeCheckInputs = [
    inetutils
    wget
  ];
  checkFlags = optional (!cgiSupport) "CGITESTS=";

  meta = with lib; {