mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-25 14:24:40 +00:00
4f0dadbf38
After final improvements to the official formatter implementation, this commit now performs the first treewide reformat of Nix files using it. This is part of the implementation of RFC 166. Only "inactive" files are reformatted, meaning only files that aren't being touched by any PR with activity in the past 2 months. This is to avoid conflicts for PRs that might soon be merged. Later we can do a full treewide reformat to get the rest, which should not cause as many conflicts. A CI check has already been running for some time to ensure that new and already-formatted files are formatted, so the files being reformatted here should also stay formatted. This commit was automatically created and can be verified using nix-builda08b3a4d19
.tar.gz \ --argstr baseRevb32a094368
result/bin/apply-formatting $NIXPKGS_PATH
121 lines
2.7 KiB
Nix
121 lines
2.7 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
buildPackages,
|
|
fetchurl,
|
|
pkg-config,
|
|
pcre2,
|
|
libxml2,
|
|
zlib,
|
|
bzip2,
|
|
which,
|
|
file,
|
|
autoreconfHook,
|
|
openssl,
|
|
enableDbi ? false,
|
|
libdbi,
|
|
enableMagnet ? false,
|
|
lua5_1,
|
|
enableMysql ? false,
|
|
libmysqlclient,
|
|
enableLdap ? false,
|
|
openldap,
|
|
enablePam ? false,
|
|
linux-pam,
|
|
enableSasl ? false,
|
|
cyrus_sasl,
|
|
enableWebDAV ? false,
|
|
sqlite,
|
|
libuuid,
|
|
enableExtendedAttrs ? false,
|
|
perl,
|
|
nixosTests,
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "lighttpd";
|
|
version = "1.4.76";
|
|
|
|
src = fetchurl {
|
|
url = "https://download.lighttpd.net/lighttpd/releases-${lib.versions.majorMinor version}.x/${pname}-${version}.tar.xz";
|
|
sha256 = "sha256-jL9CluNzz9DO3+nZeHYLWwXFj9xASLTivK8KYayPUBE=";
|
|
};
|
|
|
|
separateDebugInfo = true;
|
|
|
|
postPatch = ''
|
|
patchShebangs tests
|
|
'';
|
|
|
|
depsBuildBuild = [ buildPackages.stdenv.cc ];
|
|
|
|
nativeBuildInputs = [
|
|
autoreconfHook
|
|
pkg-config
|
|
];
|
|
buildInputs =
|
|
[
|
|
pcre2
|
|
pcre2.dev
|
|
libxml2
|
|
zlib
|
|
bzip2
|
|
which
|
|
file
|
|
openssl
|
|
]
|
|
++ lib.optional enableDbi libdbi
|
|
++ lib.optional enableMagnet lua5_1
|
|
++ lib.optional enableMysql libmysqlclient
|
|
++ lib.optional enableLdap openldap
|
|
++ lib.optional enablePam linux-pam
|
|
++ lib.optional enableSasl cyrus_sasl
|
|
++ lib.optional enableWebDAV sqlite
|
|
++ lib.optional enableWebDAV libuuid;
|
|
|
|
configureFlags =
|
|
[ "--with-openssl" ]
|
|
++ lib.optional enableDbi "--with-dbi"
|
|
++ lib.optional enableMagnet "--with-lua"
|
|
++ lib.optional enableMysql "--with-mysql"
|
|
++ lib.optional enableLdap "--with-ldap"
|
|
++ lib.optional enablePam "--with-pam"
|
|
++ lib.optional enableSasl "--with-sasl"
|
|
++ lib.optional enableWebDAV "--with-webdav-props"
|
|
++ lib.optional enableWebDAV "--with-webdav-locks"
|
|
++ lib.optional enableExtendedAttrs "--with-attr";
|
|
|
|
preConfigure = ''
|
|
export PATH=$PATH:${pcre2.dev}/bin
|
|
sed -i "s:/usr/bin/file:${file}/bin/file:g" configure
|
|
'';
|
|
|
|
nativeCheckInputs = [ perl ];
|
|
doCheck = true;
|
|
|
|
postInstall = ''
|
|
mkdir -p "$out/share/lighttpd/doc/config"
|
|
cp -vr doc/config "$out/share/lighttpd/doc/"
|
|
# Remove files that references needless store paths (dependency bloat)
|
|
rm "$out/share/lighttpd/doc/config/Makefile"*
|
|
rm "$out/share/lighttpd/doc/config/conf.d/Makefile"*
|
|
rm "$out/share/lighttpd/doc/config/vhosts.d/Makefile"*
|
|
'';
|
|
|
|
passthru.tests = {
|
|
inherit (nixosTests) lighttpd;
|
|
};
|
|
|
|
meta = with lib; {
|
|
description = "Lightweight high-performance web server";
|
|
homepage = "http://www.lighttpd.net/";
|
|
license = lib.licenses.bsd3;
|
|
platforms = platforms.linux ++ platforms.darwin;
|
|
maintainers = with maintainers; [
|
|
bjornfor
|
|
brecht
|
|
];
|
|
mainProgram = "lighttpd";
|
|
};
|
|
}
|