diff --git a/pkgs/by-name/ve/vectorscan/package.nix b/pkgs/by-name/ve/vectorscan/package.nix index e2554d526f25..206fb21b02eb 100644 --- a/pkgs/by-name/ve/vectorscan/package.nix +++ b/pkgs/by-name/ve/vectorscan/package.nix @@ -1,15 +1,16 @@ -{ lib -, stdenv -, fetchFromGitHub -, cmake -, pkg-config -, ragel -, util-linux -, python3 -, boost -, sqlite -, pcre -, enableShared ? !stdenv.hostPlatform.isStatic +{ + lib, + stdenv, + fetchFromGitHub, + cmake, + pkg-config, + ragel, + util-linux, + python3, + boost, + sqlite, + pcre, + enableShared ? !stdenv.hostPlatform.isStatic, }: stdenv.mkDerivation rec { @@ -55,18 +56,35 @@ stdenv.mkDerivation rec { # # For generic builds (e.g. x86_64) this can mean using an implementation not optimized for the # potentially available more modern hardware extensions (e.g. x86_64 with AVX512). - cmakeFlags = [ (if enableShared then "-DBUILD_SHARED_LIBS=ON" else "BUILD_STATIC_LIBS=ON") ] - ++ - (if lib.elem stdenv.hostPlatform.system [ "x86_64-linux" "i686-linux" ] then - [ "-DBUILD_AVX2=ON" "-DBUILD_AVX512=ON" "-DBUILD_AVX512VBMI=ON" "-DFAT_RUNTIME=ON" ] - else - (if (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64) then - [ "-DBUILD_SVE=ON" "-DBUILD_SVE2=ON" "-DBUILD_SVE2_BITPERM=ON" "-DFAT_RUNTIME=ON" ] + cmakeFlags = + [ (if enableShared then "-DBUILD_SHARED_LIBS=ON" else "BUILD_STATIC_LIBS=ON") ] + ++ ( + if + lib.elem stdenv.hostPlatform.system [ + "x86_64-linux" + "i686-linux" + ] + then + [ + "-DBUILD_AVX2=ON" + "-DBUILD_AVX512=ON" + "-DBUILD_AVX512VBMI=ON" + "-DFAT_RUNTIME=ON" + ] else - [ "-DFAT_RUNTIME=OFF" ] - ++ lib.optional stdenv.hostPlatform.avx2Support "-DBUILD_AVX2=ON" - ++ lib.optional stdenv.hostPlatform.avx512Support "-DBUILD_AVX512=ON" - ) + ( + if (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64) then + [ + "-DBUILD_SVE=ON" + "-DBUILD_SVE2=ON" + "-DBUILD_SVE2_BITPERM=ON" + "-DFAT_RUNTIME=ON" + ] + else + [ "-DFAT_RUNTIME=OFF" ] + ++ lib.optional stdenv.hostPlatform.avx2Support "-DBUILD_AVX2=ON" + ++ lib.optional stdenv.hostPlatform.avx512Support "-DBUILD_AVX512=ON" + ) ); doCheck = true; @@ -95,7 +113,14 @@ stdenv.mkDerivation rec { homepage = "https://www.vectorcamp.gr/vectorscan/"; changelog = "https://github.com/VectorCamp/vectorscan/blob/${src.rev}/CHANGELOG-vectorscan.md"; platforms = platforms.unix; - license = with licenses; [ bsd3 /* and */ bsd2 /* and */ licenses.boost ]; - maintainers = with maintainers; [ tnias vlaci ]; + license = with licenses; [ + bsd3 # and + bsd2 # and + licenses.boost + ]; + maintainers = with maintainers; [ + tnias + vlaci + ]; }; }