From 8bad99561b239ac9d36442775353192334ef9807 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Sat, 13 Jul 2024 15:29:17 +0200 Subject: [PATCH 1/4] fmt: reformat --- pkgs/development/libraries/fmt/default.nix | 44 ++++++++++++++-------- 1 file changed, 28 insertions(+), 16 deletions(-) diff --git a/pkgs/development/libraries/fmt/default.nix b/pkgs/development/libraries/fmt/default.nix index 9ce329df7957..b13a0e12d0e9 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; { From b5dade8ca0fef21d44f49d1ff3ffb12031ebe3c1 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Sat, 13 Jul 2024 15:29:29 +0200 Subject: [PATCH 2/4] fmt_11: init at 11.0.1 --- pkgs/development/libraries/fmt/default.nix | 5 +++++ pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/fmt/default.nix b/pkgs/development/libraries/fmt/default.nix index b13a0e12d0e9..f42e12f03bec 100644 --- a/pkgs/development/libraries/fmt/default.nix +++ b/pkgs/development/libraries/fmt/default.nix @@ -82,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/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index fd0ad89cb57d..773f82a1931f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -20482,7 +20482,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; From 942ae171abfeb3ca2db303a93069597e42786239 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Sat, 13 Jul 2024 15:00:32 +0200 Subject: [PATCH 3/4] rspamd: reformat --- pkgs/servers/mail/rspamd/default.nix | 124 +++++++++++++++++---------- 1 file changed, 77 insertions(+), 47 deletions(-) diff --git a/pkgs/servers/mail/rspamd/default.nix b/pkgs/servers/mail/rspamd/default.nix index dd34e5cc2a62..ecd037fd4967 100644 --- a/pkgs/servers/mail/rspamd/default.nix +++ b/pkgs/servers/mail/rspamd/default.nix @@ -1,30 +1,31 @@ -{ 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, + 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, }: assert withHyperscan -> stdenv.isx86_64; @@ -42,27 +43,51 @@ stdenv.mkDerivation rec { 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 + glib + openssl + pcre + sqlite + ragel + icu + jemalloc + libsodium + xxHash + zstd + ] ++ 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 +95,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; }; } From eda516d4ed24c7800fadc72b8f125962a650027a Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Sat, 13 Jul 2024 15:46:46 +0200 Subject: [PATCH 4/4] rspamd: 3.8.4 -> 3.9.0 --- pkgs/servers/mail/rspamd/default.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pkgs/servers/mail/rspamd/default.nix b/pkgs/servers/mail/rspamd/default.nix index ecd037fd4967..41074da03471 100644 --- a/pkgs/servers/mail/rspamd/default.nix +++ b/pkgs/servers/mail/rspamd/default.nix @@ -4,7 +4,7 @@ fetchFromGitHub, cmake, doctest, - fmt, + fmt_11, perl, glib, luajit, @@ -22,6 +22,7 @@ libsodium, xxHash, zstd, + libarchive, withBlas ? true, withHyperscan ? stdenv.isx86_64, withLuaJIT ? stdenv.isx86_64, @@ -32,13 +33,13 @@ 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" ]; @@ -51,7 +52,7 @@ stdenv.mkDerivation rec { buildInputs = [ doctest - fmt + fmt_11 glib openssl pcre @@ -62,6 +63,7 @@ stdenv.mkDerivation rec { libsodium xxHash zstd + libarchive ] ++ lib.optional withHyperscan hyperscan ++ lib.optionals withBlas [