tengine: remove top-level with lib;

This commit is contained in:
TomaSajt 2024-05-13 21:51:44 +02:00
parent c34dac0481
commit 0afdc7c6c3
No known key found for this signature in database
GPG Key ID: F011163C050122A1

View File

@ -7,8 +7,9 @@
, ... , ...
}: }:
with lib; let
inherit (lib) optional optionals optionalString;
in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
version = "3.1.0"; version = "3.1.0";
pname = "tengine"; pname = "tengine";
@ -22,9 +23,9 @@ stdenv.mkDerivation rec {
buildInputs = buildInputs =
[ openssl zlib pcre libxcrypt libxml2 libxslt gd geoip gperftools jemalloc ] [ openssl zlib pcre libxcrypt libxml2 libxslt gd geoip gperftools jemalloc ]
++ concatMap (mod: mod.inputs or []) modules; ++ lib.concatMap (mod: mod.inputs or []) modules;
patches = singleton (substituteAll { patches = lib.singleton (substituteAll {
src = ../nginx/nix-etag-1.15.4.patch; src = ../nginx/nix-etag-1.15.4.patch;
preInstall = '' preInstall = ''
export nixStoreDir="$NIX_STORE" nixStoreDirLen="''${#NIX_STORE}" export nixStoreDir="$NIX_STORE" nixStoreDirLen="''${#NIX_STORE}"
@ -101,7 +102,7 @@ stdenv.mkDerivation rec {
env.NIX_CFLAGS_COMPILE = "-I${libxml2.dev}/include/libxml2 -Wno-error=implicit-fallthrough" env.NIX_CFLAGS_COMPILE = "-I${libxml2.dev}/include/libxml2 -Wno-error=implicit-fallthrough"
+ optionalString stdenv.isDarwin " -Wno-error=deprecated-declarations"; + optionalString stdenv.isDarwin " -Wno-error=deprecated-declarations";
preConfigure = (concatMapStringsSep "\n" (mod: mod.preConfigure or "") modules); preConfigure = (lib.concatMapStringsSep "\n" (mod: mod.preConfigure or "") modules);
hardeningEnable = optional (!stdenv.isDarwin) "pie"; hardeningEnable = optional (!stdenv.isDarwin) "pie";
@ -116,7 +117,7 @@ stdenv.mkDerivation rec {
tests = nixosTests.nginx-variants.tengine; tests = nixosTests.nginx-variants.tengine;
}; };
meta = { meta = with lib; {
description = "Web server based on Nginx and has many advanced features, originated by Taobao"; description = "Web server based on Nginx and has many advanced features, originated by Taobao";
mainProgram = "nginx"; mainProgram = "nginx";
homepage = "https://tengine.taobao.org"; homepage = "https://tengine.taobao.org";