mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-04-13 06:37:26 +00:00
Merge pull request #311458 from TomaSajt/servers-toplevel-with
Remove usage of top-level `with lib;` from `pkgs/servers`
This commit is contained in:
commit
d4b7361c84
@ -7,8 +7,9 @@
|
||||
, nixosTests
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
inherit (lib) optional;
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "corosync";
|
||||
version = "3.1.8";
|
||||
@ -50,7 +51,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
preConfigure = optionalString enableInfiniBandRdma ''
|
||||
preConfigure = lib.optionalString enableInfiniBandRdma ''
|
||||
# configure looks for the pkg-config files
|
||||
# of librdmacm and libibverbs
|
||||
# Howver, rmda-core does not provide a pkg-config file
|
||||
@ -70,7 +71,7 @@ stdenv.mkDerivation rec {
|
||||
inherit (nixosTests) pacemaker;
|
||||
};
|
||||
|
||||
meta = {
|
||||
meta = with lib; {
|
||||
homepage = "http://corosync.org/";
|
||||
description = "Group Communication System with features for implementing high availability within applications";
|
||||
license = licenses.bsd3;
|
||||
|
@ -7,8 +7,9 @@
|
||||
, ...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
inherit (lib) optional optionals optionalString;
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
version = "3.1.0";
|
||||
pname = "tengine";
|
||||
@ -22,9 +23,9 @@ stdenv.mkDerivation rec {
|
||||
|
||||
buildInputs =
|
||||
[ 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;
|
||||
preInstall = ''
|
||||
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"
|
||||
+ 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";
|
||||
|
||||
@ -116,7 +117,7 @@ stdenv.mkDerivation rec {
|
||||
tests = nixosTests.nginx-variants.tengine;
|
||||
};
|
||||
|
||||
meta = {
|
||||
meta = with lib; {
|
||||
description = "Web server based on Nginx and has many advanced features, originated by Taobao";
|
||||
mainProgram = "nginx";
|
||||
homepage = "https://tengine.taobao.org";
|
||||
|
@ -12,8 +12,6 @@
|
||||
, withDebug ? false
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
phpConfig = {
|
||||
embedSupport = true;
|
||||
@ -27,6 +25,7 @@ let
|
||||
php81-unit = php81.override phpConfig;
|
||||
php82-unit = php82.override phpConfig;
|
||||
|
||||
inherit (lib) optional optionals optionalString;
|
||||
in stdenv.mkDerivation rec {
|
||||
version = "1.32.1";
|
||||
pname = "unit";
|
||||
@ -74,7 +73,7 @@ in stdenv.mkDerivation rec {
|
||||
|
||||
passthru.tests.unit-php = nixosTests.unit-php;
|
||||
|
||||
meta = {
|
||||
meta = with lib; {
|
||||
description = "Dynamic web and application server, designed to run applications in multiple languages";
|
||||
mainProgram = "unitd";
|
||||
homepage = "https://unit.nginx.org/";
|
||||
|
@ -1,7 +1,5 @@
|
||||
{ buildGoModule, fetchFromGitHub, lib }:
|
||||
|
||||
with lib;
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "nats-streaming-server";
|
||||
version = "0.25.6";
|
||||
@ -18,7 +16,7 @@ buildGoModule rec {
|
||||
# tests fail and ask to `go install`
|
||||
doCheck = false;
|
||||
|
||||
meta = {
|
||||
meta = with lib; {
|
||||
description = "NATS Streaming System Server";
|
||||
license = licenses.asl20;
|
||||
maintainers = [ maintainers.swdunlop ];
|
||||
|
@ -25,8 +25,6 @@
|
||||
# The command line administrative tools are part of other packages:
|
||||
# see pkgs.mongodb-tools and pkgs.mongosh.
|
||||
|
||||
with lib;
|
||||
|
||||
{ version, sha256, patches ? []
|
||||
, license ? lib.licenses.sspl
|
||||
, avxSupport ? stdenv.hostPlatform.avxSupport
|
||||
@ -39,7 +37,7 @@ let
|
||||
cheetah3
|
||||
psutil
|
||||
setuptools
|
||||
] ++ lib.optionals (versionAtLeast version "6.0") [
|
||||
] ++ lib.optionals (lib.versionAtLeast version "6.0") [
|
||||
packaging
|
||||
pymongo
|
||||
]);
|
||||
@ -57,7 +55,7 @@ let
|
||||
#"stemmer" -- not nice to package yet (no versioning, no makefile, no shared libs).
|
||||
#"valgrind" -- mongodb only requires valgrind.h, which is vendored in the source.
|
||||
#"wiredtiger"
|
||||
] ++ optionals stdenv.isLinux [ "tcmalloc" ];
|
||||
] ++ lib.optionals stdenv.isLinux [ "tcmalloc" ];
|
||||
inherit (lib) systems subtractLists;
|
||||
|
||||
in stdenv.mkDerivation rec {
|
||||
@ -108,7 +106,7 @@ in stdenv.mkDerivation rec {
|
||||
#include <string>'
|
||||
substituteInPlace src/mongo/db/exec/plan_stats.h --replace '#include <string>' '#include <optional>
|
||||
#include <string>'
|
||||
'' + lib.optionalString (stdenv.isDarwin && versionOlder version "6.0") ''
|
||||
'' + lib.optionalString (stdenv.isDarwin && lib.versionOlder version "6.0") ''
|
||||
substituteInPlace src/third_party/mozjs-${mozjsVersion}/extract/js/src/jsmath.cpp --replace '${mozjsReplace}' 0
|
||||
'' + lib.optionalString stdenv.isi686 ''
|
||||
|
||||
@ -143,9 +141,9 @@ in stdenv.mkDerivation rec {
|
||||
preBuild = ''
|
||||
sconsFlags+=" CC=$CC"
|
||||
sconsFlags+=" CXX=$CXX"
|
||||
'' + optionalString (!stdenv.isDarwin) ''
|
||||
'' + lib.optionalString (!stdenv.isDarwin) ''
|
||||
sconsFlags+=" AR=$AR"
|
||||
'' + optionalString stdenv.isAarch64 ''
|
||||
'' + lib.optionalString stdenv.isAarch64 ''
|
||||
sconsFlags+=" CCFLAGS='-march=armv8-a+crc'"
|
||||
'';
|
||||
|
||||
@ -165,7 +163,7 @@ in stdenv.mkDerivation rec {
|
||||
'';
|
||||
|
||||
installTargets =
|
||||
if (versionAtLeast version "6.0") then "install-devcore"
|
||||
if (lib.versionAtLeast version "6.0") then "install-devcore"
|
||||
else "install-core";
|
||||
|
||||
prefixKey = "DESTDIR=";
|
||||
@ -174,7 +172,7 @@ in stdenv.mkDerivation rec {
|
||||
|
||||
hardeningEnable = [ "pie" ];
|
||||
|
||||
meta = {
|
||||
meta = with lib; {
|
||||
description = "Scalable, high-performance, open source NoSQL database";
|
||||
homepage = "http://www.mongodb.org";
|
||||
inherit license;
|
||||
|
@ -1,10 +1,8 @@
|
||||
{ lib, fetchFromGitHub, nodePackages }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
np = nodePackages.override { generated = ./package.nix; self = np; };
|
||||
in nodePackages.buildNodePackage rec {
|
||||
in nodePackages.buildNodePackage {
|
||||
pname = "ripple-data-api";
|
||||
version = "unstable-2015-03-26";
|
||||
|
||||
@ -15,11 +13,11 @@ in nodePackages.buildNodePackage rec {
|
||||
sha256 = "sha256-QEBdYdW55sAz6jshIAr2dSfXuqE/vqA2/kBeoxf75a8=";
|
||||
};
|
||||
|
||||
deps = (filter (v: nixType v == "derivation") (attrValues np));
|
||||
deps = (lib.filter (v: lib.nixType v == "derivation") (lib.attrValues np));
|
||||
|
||||
meta = {
|
||||
description = "Historical ripple data";
|
||||
homepage = "https://github.com/ripple/ripple-data-api";
|
||||
maintainers = with maintainers; [ offline ];
|
||||
maintainers = with lib.maintainers; [ offline ];
|
||||
};
|
||||
}
|
||||
|
@ -50,8 +50,6 @@
|
||||
, enablePam ? (!stdenv.isDarwin), pam
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
# samba-tool requires libxcrypt-legacy algorithms
|
||||
python = python3Packages.python.override {
|
||||
@ -61,6 +59,8 @@ let
|
||||
wrapPython = python3Packages.wrapPython.override {
|
||||
inherit python;
|
||||
};
|
||||
|
||||
inherit (lib) optional optionals;
|
||||
in
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "samba";
|
||||
@ -200,7 +200,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
|
||||
# Save asn1_compile and compile_et so they are available to run on the build
|
||||
# platform when cross-compiling
|
||||
postInstall = optionalString (stdenv.hostPlatform == stdenv.buildPlatform) ''
|
||||
postInstall = lib.optionalString (stdenv.hostPlatform == stdenv.buildPlatform) ''
|
||||
mkdir -p "$dev/bin"
|
||||
cp bin/asn1_compile bin/compile_et "$dev/bin"
|
||||
'';
|
||||
|
@ -11,11 +11,10 @@
|
||||
, zlib
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
info = splitString "-" stdenv.hostPlatform.system;
|
||||
arch = elemAt info 0;
|
||||
plat = elemAt info 1;
|
||||
info = lib.splitString "-" stdenv.hostPlatform.system;
|
||||
arch = lib.elemAt info 0;
|
||||
plat = lib.elemAt info 1;
|
||||
hashes =
|
||||
{
|
||||
x86_64-linux = "sha512-OiWGRxaCdRxXuxE/W04v87ytzOeUEcHRjF5nyRkdqSbZSnLXUyKOYQ4fKmk4til0VBOaKZYId20XyPiu/XTXNw==";
|
||||
@ -62,7 +61,7 @@ stdenv.mkDerivation rec {
|
||||
--replace 'bin/elasticsearch-keystore' "$out/bin/elasticsearch-keystore"
|
||||
|
||||
wrapProgram $out/bin/elasticsearch \
|
||||
--prefix PATH : "${makeBinPath [ util-linux coreutils gnugrep ]}" \
|
||||
--prefix PATH : "${lib.makeBinPath [ util-linux coreutils gnugrep ]}" \
|
||||
--set JAVA_HOME "${jre_headless}"
|
||||
|
||||
wrapProgram $out/bin/elasticsearch-plugin --set JAVA_HOME "${jre_headless}"
|
||||
@ -70,9 +69,9 @@ stdenv.mkDerivation rec {
|
||||
|
||||
passthru = { enableUnfree = true; };
|
||||
|
||||
meta = {
|
||||
meta = with lib; {
|
||||
description = "Open Source, Distributed, RESTful Search Engine";
|
||||
sourceProvenance = with lib.sourceTypes; [
|
||||
sourceProvenance = with sourceTypes; [
|
||||
binaryBytecode
|
||||
binaryNativeCode
|
||||
];
|
||||
|
@ -11,8 +11,9 @@ let
|
||||
optPam = shouldUsePkg pam;
|
||||
optLibidn = shouldUsePkg libidn;
|
||||
optGnutls = shouldUsePkg gnutls;
|
||||
|
||||
inherit (lib) enableFeature withFeature optionalString;
|
||||
in
|
||||
with lib;
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "shishi";
|
||||
version = "1.0.2";
|
||||
@ -66,7 +67,7 @@ stdenv.mkDerivation rec {
|
||||
-e 's,\(-ltasn1\),-L${libtasn1.out}/lib \1,'
|
||||
'';
|
||||
|
||||
meta = {
|
||||
meta = with lib; {
|
||||
homepage = "https://www.gnu.org/software/shishi/";
|
||||
description = "Implementation of the Kerberos 5 network security system";
|
||||
license = licenses.gpl3Plus;
|
||||
|
@ -4,10 +4,8 @@
|
||||
, version, hash, ...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
isVer33 = versionAtLeast version "3.3";
|
||||
isVer33 = lib.versionAtLeast version "3.3";
|
||||
|
||||
in stdenv.mkDerivation {
|
||||
pname = "mariadb-connector-c";
|
||||
@ -46,12 +44,12 @@ in stdenv.mkDerivation {
|
||||
'';
|
||||
|
||||
# The cmake setup-hook uses $out/lib by default, this is not the case here.
|
||||
preConfigure = optionalString stdenv.isDarwin ''
|
||||
preConfigure = lib.optionalString stdenv.isDarwin ''
|
||||
cmakeFlagsArray+=("-DCMAKE_INSTALL_NAME_DIR=$out/lib/mariadb")
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
propagatedBuildInputs = [ curl openssl zlib ] ++ optional isVer33 zstd;
|
||||
propagatedBuildInputs = [ curl openssl zlib ] ++ lib.optional isVer33 zstd;
|
||||
buildInputs = [ libiconv ];
|
||||
|
||||
postInstall = ''
|
||||
@ -67,7 +65,7 @@ in stdenv.mkDerivation {
|
||||
install -Dm644 include/ma_config.h $dev/include/mariadb/my_config.h
|
||||
'';
|
||||
|
||||
meta = {
|
||||
meta = with lib; {
|
||||
description = "Client library that can be used to connect to MySQL or MariaDB";
|
||||
license = licenses.lgpl21Plus;
|
||||
maintainers = with maintainers; [ globin ];
|
||||
|
@ -9,8 +9,6 @@
|
||||
, withOnlyInstalledCommunityModules ? [ ]
|
||||
, withCommunityModules ? [ ] }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
luaEnv = lua.withPackages(p: with p; [
|
||||
luasocket luasec luaexpat luafilesystem luabitop luadbi-sqlite3 luaunbound
|
||||
@ -72,7 +70,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
# the wrapping should go away once lua hook is fixed
|
||||
postInstall = ''
|
||||
${concatMapStringsSep "\n" (module: ''
|
||||
${lib.concatMapStringsSep "\n" (module: ''
|
||||
cp -r $communityModules/mod_${module} $out/lib/prosody/modules/
|
||||
'') (lib.lists.unique(nixosModuleDeps ++ withCommunityModules ++ withOnlyInstalledCommunityModules))}
|
||||
make -C tools/migration install
|
||||
@ -83,7 +81,7 @@ stdenv.mkDerivation rec {
|
||||
tests = { inherit (nixosTests) prosody prosody-mysql; };
|
||||
};
|
||||
|
||||
meta = {
|
||||
meta = with lib; {
|
||||
description = "Open-source XMPP application server written in Lua";
|
||||
license = licenses.mit;
|
||||
homepage = "https://prosody.im";
|
||||
|
Loading…
Reference in New Issue
Block a user