diff --git a/pkgs/development/libraries/fmt/default.nix b/pkgs/development/libraries/fmt/default.nix index 9ce329df7957..f42e12f03bec 100644 --- a/pkgs/development/libraries/fmt/default.nix +++ b/pkgs/development/libraries/fmt/default.nix @@ -1,23 +1,32 @@ -{ lib -, stdenv -, fetchFromGitHub -, cmake -, enableShared ? !stdenv.hostPlatform.isStatic +{ + lib, + stdenv, + fetchFromGitHub, + cmake, + enableShared ? !stdenv.hostPlatform.isStatic, -# tests -, mpd -, openimageio -, fcitx5 -, spdlog + # tests + mpd, + openimageio, + fcitx5, + spdlog, }: let - generic = { version, sha256, patches ? [ ] }: + generic = + { + version, + sha256, + patches ? [ ], + }: stdenv.mkDerivation { pname = "fmt"; inherit version; - outputs = [ "out" "dev" ]; + outputs = [ + "out" + "dev" + ]; src = fetchFromGitHub { owner = "fmtlib"; @@ -30,14 +39,17 @@ let nativeBuildInputs = [ cmake ]; - cmakeFlags = [ - "-DBUILD_SHARED_LIBS=${if enableShared then "ON" else "OFF"}" - ]; + cmakeFlags = [ "-DBUILD_SHARED_LIBS=${if enableShared then "ON" else "OFF"}" ]; doCheck = true; passthru.tests = { - inherit mpd openimageio fcitx5 spdlog; + inherit + mpd + openimageio + fcitx5 + spdlog + ; }; meta = with lib; { @@ -70,4 +82,9 @@ in version = "10.2.1"; sha256 = "sha256-pEltGLAHLZ3xypD/Ur4dWPWJ9BGVXwqQyKcDWVmC3co="; }; + + fmt_11 = generic { + version = "11.0.1"; + sha256 = "sha256-EPidbZxCvysrL64AzbpJDowiNxqy4ii+qwSWAFwf/Ps="; + }; } diff --git a/pkgs/servers/mail/rspamd/default.nix b/pkgs/servers/mail/rspamd/default.nix index dd34e5cc2a62..41074da03471 100644 --- a/pkgs/servers/mail/rspamd/default.nix +++ b/pkgs/servers/mail/rspamd/default.nix @@ -1,68 +1,95 @@ -{ stdenv -, lib -, fetchFromGitHub -, cmake -, doctest -, fmt -, perl -, glib -, luajit -, openssl -, pcre -, pkg-config -, sqlite -, ragel -, icu -, hyperscan -, jemalloc -, blas -, lapack -, lua -, libsodium -, xxHash -, zstd -, withBlas ? true -, withHyperscan ? stdenv.isx86_64 -, withLuaJIT ? stdenv.isx86_64 -, nixosTests +{ + stdenv, + lib, + fetchFromGitHub, + cmake, + doctest, + fmt_11, + perl, + glib, + luajit, + openssl, + pcre, + pkg-config, + sqlite, + ragel, + icu, + hyperscan, + jemalloc, + blas, + lapack, + lua, + libsodium, + xxHash, + zstd, + libarchive, + withBlas ? true, + withHyperscan ? stdenv.isx86_64, + withLuaJIT ? stdenv.isx86_64, + nixosTests, }: assert withHyperscan -> stdenv.isx86_64; stdenv.mkDerivation rec { pname = "rspamd"; - version = "3.8.4"; + version = "3.9.0"; src = fetchFromGitHub { owner = "rspamd"; repo = "rspamd"; rev = version; - hash = "sha256-3skF+aQv8Y3ATujV+WH4DxwyQ2hXR6CDZz77CkaRso0="; + hash = "sha256-PCogHnes3/8qqdcqsiUzuVVEUf8+ze3xiYUmfe6L3IU="; }; hardeningEnable = [ "pie" ]; - nativeBuildInputs = [ cmake pkg-config perl ]; - buildInputs = [ doctest fmt glib openssl pcre sqlite ragel icu jemalloc libsodium xxHash zstd ] + nativeBuildInputs = [ + cmake + pkg-config + perl + ]; + buildInputs = + [ + doctest + fmt_11 + glib + openssl + pcre + sqlite + ragel + icu + jemalloc + libsodium + xxHash + zstd + libarchive + ] ++ lib.optional withHyperscan hyperscan - ++ lib.optionals withBlas [ blas lapack ] - ++ lib.optional withLuaJIT luajit ++ lib.optional (!withLuaJIT) lua; + ++ lib.optionals withBlas [ + blas + lapack + ] + ++ lib.optional withLuaJIT luajit + ++ lib.optional (!withLuaJIT) lua; - cmakeFlags = [ - # pcre2 jit seems to cause crashes: https://github.com/NixOS/nixpkgs/pull/181908 - "-DENABLE_PCRE2=OFF" - "-DDEBIAN_BUILD=ON" - "-DRUNDIR=/run/rspamd" - "-DDBDIR=/var/lib/rspamd" - "-DLOGDIR=/var/log/rspamd" - "-DLOCAL_CONFDIR=/etc/rspamd" - "-DENABLE_JEMALLOC=ON" - "-DSYSTEM_DOCTEST=ON" - "-DSYSTEM_FMT=ON" - "-DSYSTEM_XXHASH=ON" - "-DSYSTEM_ZSTD=ON" - ] ++ lib.optional withHyperscan "-DENABLE_HYPERSCAN=ON" - ++ lib.optional (!withLuaJIT) "-DENABLE_LUAJIT=OFF"; + cmakeFlags = + [ + # pcre2 jit seems to cause crashes: https://github.com/NixOS/nixpkgs/pull/181908 + "-DENABLE_PCRE2=OFF" + "-DDEBIAN_BUILD=ON" + "-DRUNDIR=/run/rspamd" + "-DDBDIR=/var/lib/rspamd" + "-DLOGDIR=/var/log/rspamd" + "-DLOCAL_CONFDIR=/etc/rspamd" + "-DENABLE_JEMALLOC=ON" + "-DSYSTEM_DOCTEST=ON" + "-DSYSTEM_FMT=ON" + "-DSYSTEM_XXHASH=ON" + "-DSYSTEM_ZSTD=ON" + ] + ++ lib.optional withHyperscan "-DENABLE_HYPERSCAN=ON" + ++ lib.optional (!withLuaJIT) "-DENABLE_LUAJIT=OFF"; passthru.tests.rspamd = nixosTests.rspamd; @@ -70,7 +97,12 @@ stdenv.mkDerivation rec { homepage = "https://rspamd.com"; license = licenses.asl20; description = "Advanced spam filtering system"; - maintainers = with maintainers; [ avnik fpletz globin lewo ]; + maintainers = with maintainers; [ + avnik + fpletz + globin + lewo + ]; platforms = with platforms; linux; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 7e44a10e24a3..5df035705cd9 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -20488,7 +20488,7 @@ with pkgs; flyway = callPackage ../development/tools/flyway { }; - inherit (callPackages ../development/libraries/fmt { }) fmt_8 fmt_9 fmt_10; + inherit (callPackages ../development/libraries/fmt { }) fmt_8 fmt_9 fmt_10 fmt_11; fmt = fmt_10;