python3Packages.orjson: Disable failing tests on 32 bit
[NixPkgs.git] / pkgs / development / libraries / xsimd / default.nix
blob7d0af99645ec9a276970ae2f29c11c397b67d4b0
1 { lib, stdenv, fetchFromGitHub, cmake, gtest }:
2 stdenv.mkDerivation rec {
3   pname = "xsimd";
4   version = "8.1.0";
5   src = fetchFromGitHub {
6     owner = "xtensor-stack";
7     repo = "xsimd";
8     rev = version;
9     sha256 = "sha256-Aqs6XJkGjAjGAp0PprabSM4m+32M/UXpSHppCHdzaZk=";
10   };
12   nativeBuildInputs = [ cmake ];
14   cmakeFlags = [ "-DBUILD_TESTS=ON" ];
16   doCheck = true;
17   checkInputs = [ gtest ];
18   checkTarget = "xtest";
19   GTEST_FILTER =
20     let
21       # Upstream Issue: https://github.com/xtensor-stack/xsimd/issues/456
22       filteredTests = lib.optionals stdenv.hostPlatform.isDarwin [
23         "error_gamma_test/*"
24       ];
25     in
26     "-${builtins.concatStringsSep ":" filteredTests}";
28   # https://github.com/xtensor-stack/xsimd/issues/748
29   postPatch = ''
30     substituteInPlace xsimd.pc.in \
31       --replace '$'{prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@
32   '';
34   meta = with lib; {
35     description = "C++ wrappers for SIMD intrinsics";
36     homepage = "https://github.com/xtensor-stack/xsimd";
37     license = licenses.bsd3;
38     maintainers = with maintainers; [ tobim ];
39     platforms = platforms.all;
40   };