1 { lib, stdenv, fetchFromGitHub, cmake, gtest }:
2 stdenv.mkDerivation rec {
5 src = fetchFromGitHub {
6 owner = "xtensor-stack";
9 sha256 = "sha256-Aqs6XJkGjAjGAp0PprabSM4m+32M/UXpSHppCHdzaZk=";
12 nativeBuildInputs = [ cmake ];
14 cmakeFlags = [ "-DBUILD_TESTS=ON" ];
17 checkInputs = [ gtest ];
18 checkTarget = "xtest";
21 # Upstream Issue: https://github.com/xtensor-stack/xsimd/issues/456
22 filteredTests = lib.optionals stdenv.hostPlatform.isDarwin [
26 "-${builtins.concatStringsSep ":" filteredTests}";
28 # https://github.com/xtensor-stack/xsimd/issues/748
30 substituteInPlace xsimd.pc.in \
31 --replace '$'{prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@
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;